Change recordsource based on form choice

dapfeifer

Bringing Maverick Mojo
Local time
Today, 12:34
Joined
Jun 17, 2008
Messages
68
Hey everyone,

I'm trying to generate a report that needs to have its record source based on what option (of 2) a user selects. A different query will be called depending on the selection. Any suggestions to help point me in the right direction would be great, because I seem to be running in circles at the moment!
 
You can put code in the report's open event that tests the form and sets the record source appropriately:

Me.RecordSource = "QueryName"
 
Once again you came through for me with enough to get me on track for what I need done. I ended up writing an if statement that varies based on which of the two options is selected, then assigning the corresponding query. Thanks for the help again!
 

Users who are viewing this thread

Back
Top Bottom