I have an Access 2003 database. Behind one form I have this code
Dim D As Database
Dim t As Recordset
.
.
Set D = CurrentDb
Set t = D.OpenRecordset("tblInv", dbOpenTable)
Reference is: Microsoft DAO 3.6 Object Library
This works fine when tblInv is actually part of the database.
But when I put tblInv in a separate database and linked to it, I got an error when the code reached the Set t = line:
Run-time error '3219': Invalid operation.
To get around this in a pinch, I switched over to ADO processing and the program now works again. But I don't understand why the error with the DAO approach. Has anybody else run into this?
Dim D As Database
Dim t As Recordset
.
.
Set D = CurrentDb
Set t = D.OpenRecordset("tblInv", dbOpenTable)
Reference is: Microsoft DAO 3.6 Object Library
This works fine when tblInv is actually part of the database.
But when I put tblInv in a separate database and linked to it, I got an error when the code reached the Set t = line:
Run-time error '3219': Invalid operation.
To get around this in a pinch, I switched over to ADO processing and the program now works again. But I don't understand why the error with the DAO approach. Has anybody else run into this?