Link to home
Start Free TrialLog in
Avatar of rustyroo
rustyrooFlag 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
Avatar of mbizup
mbizup
Flag of Kazakhstan image

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
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial