Solved pass parameter for two queries

distinky

New member
Local time
Today, 23:26
Joined
Nov 22, 2022
Messages
8
hi,

so ive created two append queries, one is called 'task_create_header' which when a report is generated it notes the employee, task date, start date, task id and the job type.
the other one is called 'task_create_detail,' which brings over the job Id from 'task_create_header.'
im wanting to create a macro that runs two queries and it prompts the user to put in a username then a job id and then runs a report that displays like a log of actions.

im unsure on how to do this, any thoughts?
 
My thought is to create a form.

Have an input area for the username, one for the id and then a button. When the button is clicked it perfroms VBA (instead of a macro) to execute the actions you want.
 
using a Form to capture the selection criteria is far superior to using a prompt from the query. Then instead of a macro, use the click event of a button on the form to run the append queries.

I know macros seem like a lower bar for newcomers but they are not. You use the OpenReport method to open a report in VBA and Intellisense will help you with the arguments or you can look in help to see the options ahead of time.
 

Users who are viewing this thread

Back
Top Bottom