I've been working (at work) in Access 97 for a few years and have used VBA recordset objects perhaps a thousand times. When I tried to do it at home in Access 2002, I got an impassable and inexplicable error. Here's the basic code:
Dim db as Database, rst as Recordset, sql as String
set db = CurrentDB
sql = "select Table.Anything from Table;"
set rst = db.OpenRecordset(sql)
...etc...etc...
When I go to run it, it stops at the "set rst..." line with a "Type Mismatch" error. Does anyone have a clue? I've done this and more complicated ones more times than I could remember in 97, and the 2002 Help documentation shows that this classic syntax should work.
Dim db as Database, rst as Recordset, sql as String
set db = CurrentDB
sql = "select Table.Anything from Table;"
set rst = db.OpenRecordset(sql)
...etc...etc...
When I go to run it, it stops at the "set rst..." line with a "Type Mismatch" error. Does anyone have a clue? I've done this and more complicated ones more times than I could remember in 97, and the 2002 Help documentation shows that this classic syntax should work.