General information
Category:
Database DAO/RDO/ODBC/ADO
Title:
How to get a recordset working
Good day everyone!
Can someone please help me with this problem. I copied the code and a form from a working project and into a new project. What I want to do is enable users to have the same exact fields and format they are used to but save the data entry into a different database.
My problem is that when a particular piece of code is run I get a "Type Mismatch" error. The offending line is as follows:
Set db = OpenDatabase("C:\mydatabase.mdb")
Set rsref = db.OpenRecordset("myTable", dbOpenTable)
I've got the rsref declared as:
Public rsref As DAO.Recordset
So why is it that when in the working project I start typing in db. and the menu pops up with a choice of selections I see OpenRecordset (along with other choices like 'Close' and 'Execute') but when I type the same in the new project the only choices I get are 'LogOffServer', 'LogOnServer', 'Parent', 'SetDataSource', 'Tables' and 'Verify'
The Components and References are the same in both projects.
I'm guessing that there is some sort of connection that I need?
Please help!
Thanks!
Max
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only