Querydef question (1 Viewer)

Johny

Registered User.
Local time
Today, 12:35
Joined
Jun 1, 2004
Messages
80
I got an existing querydef and a recordset.
I want to set the source of the querydef to the recordset. How do I do this?
It must be something simple I overlooked.

Isn't there a SQL() function on the recordset obj like on the querydef obj?
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 11:35
Joined
Sep 12, 2006
Messages
15,660
what do you mean?

if you have a saved query, in code you just put

dim rst as recordset
set rst = currentdb.openrecordset("my query name") (in quotation marks)
 

Users who are viewing this thread

Top Bottom