Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Choose a query to run a report on 1

Status
Not open for further replies.

nuVBer

Programmer
Jul 6, 2001
63
US
I want to be able to allow the user to select a query to be selected from a combo box and have it be the recordsource of a report that I designed and have the report run with that query. I want to do this in vba code, but I can't set the recordsource before the report is run. How do I pass this query name to the report?
 
Write the name of the selected query to a global variable (defined as such, in a module). On the Open Event of the report, assign the global variable to the report's recordsource.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top