Change the form RecordSource using a Macro (1 Viewer)

svanvolk

New member
Local time
Today, 08:44
Joined
Sep 21, 2006
Messages
5
I have a form that is based on a query. I would like to change the form's RecordSource to another query using SetValue in a Macro.

Under Action Arguments I have

Item: Forms![Receiving Query subform].RecordSource

But I don't know what to put for an expression. I would like to use the same form but base the RecordSource on a query called "Receiving Search by Date". :eek:

Steve
 

macca the hacke

Macca the Hacca
Local time
Today, 13:44
Joined
Dec 1, 2005
Messages
221
Me.recordsource = "receiving search by date" would do it in code. You could then call the code from a macro if you want.
 

svanvolk

New member
Local time
Today, 08:44
Joined
Sep 21, 2006
Messages
5
I forgot to mention that the form record source that I'm trying to change is in an unbound subform based on a query. In the main form, I have combo boxes providing the criteria for a query on the subform's query. I would like to change the recordsource of the subform to reflect this new query.

Steve
 

Users who are viewing this thread

Top Bottom