I am having a problem of using a SQL statement in my OpenRecordset
statment. My code looks something like the following where [Product] is
an Access variable and Productstr is a global variable, which is a
string. Unfortunately, VB is returning all of the the records and not a
subset of the records as the where statement should do. Can someone
please help? I am having a tough time on this one as I just spent 3 hours
with Microsoft technical support.
sqlmsg = "Select All * from collapsed _
where collapsed.[product] = Productstr "
Set db = DBEngine.Workspaces(0).OpenDatabase("C:\PROJ1\SAMPLES.MDB")
Set rs = db.OpenRecordset(sqlmsg)