Create recordset?

geralf

Registered User.
Local time
Today, 20:44
Joined
Nov 15, 2002
Messages
212
Can anyone please help me on how I create a recordset from a query in VBA?

Thanks in advance
Gerhard
 
A query is a recordset. What are you trying to do?
 
Sorry for not being clear on this one. I know that when you run a query, it returns a recordset. I want to have the recordset returned by a query available in a recordset variable in VBA.

I searched the help files, and came across the OpenRecordset method. Am I at the right track here or what?

Thanks for your fast reply Mile-O-Phile


Regards
Gerhard
 
Here's a basic DAO example in VBA.

Code:
Dim db As DAO.Database
Dim rs As DAO.Recordset

Set db = CurrrentDb
Set rs = db.OpenRecordset("qryYourQuery")

Now you can manipulate the records.
 

Users who are viewing this thread

Back
Top Bottom