vba - open report and pass query parameter

epicmove

Ben
Local time
Today, 08:02
Joined
Apr 21, 2006
Messages
59
Hello.

I have created a procedure that runs a report, outputs it in a specified format and then emails the report using a "blat" script (had to use blat rather than sendobject function as user does not have a local outlook profile).

Anyway - the above works fine other than the fact that the report is based on a paramater query - the user is prompted to enter a date.

When I use a macro to run the report, the parameter request pops up and the user can enter a date. This does work with my vb code.

Can someone tell me how I can display this as normal or pass the parameter to the query using vba (presume i create a new query def and then use the .parameters property to achieve this)

Thanks,

Ben
 
create a form to enter the parameter. then the report and query can reference the form and the control holding the parameter.
 

Users who are viewing this thread

Back
Top Bottom