View Full Version : vba - open report and pass query parameter


epicmove
09-07-2007, 12:14 AM
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

Dennisk
09-07-2007, 07:05 AM
create a form to enter the parameter. then the report and query can reference the form and the control holding the parameter.