sql in vb

Massoud

Registered User.
Local time
Today, 02:21
Joined
Jul 11, 2002
Messages
37
Hi.
I want to run a sql command in my vb code using:
docmd.runsql "sql command string"
Is there any way to put the result in recordset variable as we do with tables:

dim docs as recordset
set docs= currentdb.openrecordset(tablename)....

Thanks again.
 
dim rst as dao.recordset
set rst = currentdb.openrecordset("sql command string")

Greetz
 
Wow That was fast.
But how can I do this using the query name?
Thanks again
 
Could you please explain what db stands for and what dbOpenDynaset is used for?


Thanks
 
I tested this solution but it produces error: "Too Few parameters. Expected 1"
 

Users who are viewing this thread

Back
Top Bottom