Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

code to open reports

Status
Not open for further replies.

aspnetuser

Technical User
Sep 9, 2004
273
US
i use the following code that allows users to click reports in a list menu.

Dim X As Variant
For Each X In ReportList.ItemsSelected
DoCmd.OpenReport ReportList.ItemData(X), acViewPreview
Next

it lets them pick mutiple reports and view them.

I have to pop up a form called reportprompt so they can enter their prompts for the report.

this was the only way i could get the prompting to work

can i add this somehow to this code before the report they pick in the list menu is generated?
 
You can include your query parameters on a form.
You would create unbound objects (text boxes, combo boxes, etc) on your form. Then, within the query, reference the values on your form (Forms!FormName!ObjectName.value).

This way you only have to enter the parameters one time.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top