|
-
April 25th, 2001, 03:03 AM
#1
Recordset Object
I am using the Recordset object in Access 2000, but it seems that there are a few different definitions of it, and so I get a "type mismatch" error on the following code:
Dim db as Database
Dim rc as Recordset
set db=CurrentDB
set rc=db.OpenRecordset("mytable")
I think it's because of the References table I am using ("Visual Basic for Applications", "Microsoft Access 9.0 Object Library" and more).
How do I force the "Dim rc as Recordset" statement to define my variable as the same Recordset that Database.OpenRecordset is returning ?
Thanks,
Yaron.
-
April 25th, 2001, 07:23 AM
#2
Re: Recordset Object
That might happen if you use ADO recordset and referencing to the DAO object Database. Make shure that either you are using ADO or DAO. In case you are using both of them you have to use prefix like
Dim db as DAO.Database
or
Dim rc as ADODB.Recordset
Iouri Boutchkine
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|