Avatar of rustyroo
rustyroo
Flag for Australia asked on

access macro - can i automate parameter input for multiple transfer spreadsheet export lines in a macro?

hey,

I have a series of queries that I export to an excel document via a macro that runs multiple transferspreadsheet commands.  All of the queries that it pulls however have a parameter to imput, all are the same parameter with identical name ( it is a date).  Currently I have to input this date for as many times as I have transferspreadsheet commands.  Is there a way to set this parameter as part of the macro whether it be via vba code run or whatever??

Thanks for any advice.

Rusty
Microsoft AccessVB ScriptSQL

Avatar of undefined
Last Comment
mbizup

8/22/2022 - Mon
mbizup

Create a small form with a textbox for the user to enter the parameter value.  Then modify your query to specify the criteria as:

Forms!YourFormName!YourTextboxName


If you leave the form open in the background when that report is running, the parameter will be read from the textbox on that form.
ASKER CERTIFIED SOLUTION
mbizup

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Your help has saved me hundreds of hours of internet surfing.
fblack61