Variable Recordsource

spcepickle

Registered User.
Local time
Yesterday, 21:26
Joined
Jan 8, 2008
Messages
30
Hey All - I have a bunch of queries that all filter the same Main Table in different ways. I would like to have one form that displays the data based on a query that I choose. I found a past thread that mentioned using Me.Recordsource = "queryName" but I am not sure where to put that code because when I put it in the record source box I get an error.

Thanks, Amelia
 
One way would be to have a button that you click to change the record source from one query to the next. In which case that's where you would put the code, in the buttons click event.
 
I would use an option group with all the different options for queries. That way you can easily see which option is selected currently.

After changing the recordsource, you may have to do a Me.Requery. Not sure though. I've never had a need to make a form do that.
 

Users who are viewing this thread

Back
Top Bottom