Record Set Error?

paulmcdonnell

Ready to Help
Local time
Today, 01:35
Joined
Apr 11, 2001
Messages
167
Hi Guys

I have this record set code that i took from my access 97 database and am trying to use in access XP but I get a type mismatch error highlighting the 'Set rst' line of code.

Dim Action As String
Dim dbs As Database
Dim rst As Recordset
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("Query_Summary_Auctions_Next_Tagged_for_email_Prep_warning")

I have DAO 3.6 slected and just can't quite understand why i'm getting the error.

Can anyone help

Cheers
Paul
 
Paul,

Try:

Dim dbs As DAO.Database
Dim rst As DAO.Recordset

and you can also explicity boost the "priority" of DAO to above
that of ADO in Tools --> References.

Wayne
 
DAO worked

Cheers

Dim dbs As DAO.Database
Dim rst As DAO.Recordset

worked a treat, also stepped the dao reference down to DAO 3.51

If you have the time could you explain why this worked?

Cheers
Paul
 

Users who are viewing this thread

Back
Top Bottom