Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get a recordset working
Message
 
 
To
All
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Title:
How to get a recordset working
Miscellaneous
Thread ID:
00865491
Message ID:
00865491
Views:
59
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
Map
View

Click here to load this message in the networking platform