D
David Portwood
This was my first attempt to open a DAO recordset. Several problems, one
still unresolved.
Code that fails:
Dim db as Database
Dim rstLog as Recordset
Set db = CurrentDb()
Set rstLog = db.OpenRecordset("Log")
I'm getting a "Type Mismatch" error from the last Set statement.
I also tried
Set rstLog = db.OpenRecordset("Log", dbOpenDynaset)
That didn't work either. My Log table is just a table. It has a primary key.
I added a reference to the DAO Objects library (I think it was 3.6) which
resolved another problem. Is there something else I need to do? Maybe use
dot notation somewhere, e.g.,
Dim rstLog as DAO.recordset?
Does anybody see what might be wrong here? Very frustrating. Has to be
something simple but I can't find it.
still unresolved.
Code that fails:
Dim db as Database
Dim rstLog as Recordset
Set db = CurrentDb()
Set rstLog = db.OpenRecordset("Log")
I'm getting a "Type Mismatch" error from the last Set statement.
I also tried
Set rstLog = db.OpenRecordset("Log", dbOpenDynaset)
That didn't work either. My Log table is just a table. It has a primary key.
I added a reference to the DAO Objects library (I think it was 3.6) which
resolved another problem. Is there something else I need to do? Maybe use
dot notation somewhere, e.g.,
Dim rstLog as DAO.recordset?
Does anybody see what might be wrong here? Very frustrating. Has to be
something simple but I can't find it.