G
George M
I am building an application in access2000 as an adp
connected to SQL server 7. In trying to open a record set
in a module I can not get it to work like I have done many
times before in an mdb file, should I be doing something
different?
Code is;
Dim dbs As Database
Dim rst As DAO.Recordset
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("tblStaff")
It compiles fine but at run time the "Set rst" line
produces an error "Object Variable or with block variable
not set", hover the mouse over the "Set dbs" statement
says it is still set to Nothing.
Same error with or without a DAO in front of Recordset.
Reference is set to the DAO 3.6 library.
Any guidance would be very much appreciated.
Thanks
George.
connected to SQL server 7. In trying to open a record set
in a module I can not get it to work like I have done many
times before in an mdb file, should I be doing something
different?
Code is;
Dim dbs As Database
Dim rst As DAO.Recordset
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("tblStaff")
It compiles fine but at run time the "Set rst" line
produces an error "Object Variable or with block variable
not set", hover the mouse over the "Set dbs" statement
says it is still set to Nothing.
Same error with or without a DAO in front of Recordset.
Reference is set to the DAO 3.6 library.
Any guidance would be very much appreciated.
Thanks
George.