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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reports in a list box

Status
Not open for further replies.

mrathi

Technical User
Oct 27, 2003
115
US
Hello,
Thanks for any help. I have a list box in a form. The items in the list are derieved from a query. The items can change depending on the information. I want to create a button that will print all the reports based on the items in the list. I have already created a button to click the items in the list and print individual reports.
 
If you want to open multiple reports with each filtered based on the value of a list box, then consider:
Dim strWhere as String
strWhere = "[ItemID]=" & Me.lboItemID
DoCmd.OpenReport "rptA", , ,strWhere
DoCmd.OpenReport "rptB", , ,strWhere
DoCmd.OpenReport "rptC", , ,strWhere
'etc

Duane
MS Access MVP
 
Thanks for the reply. I am quite a newbie here. I assume [ItemD] stands for the list index. If so, my concern is that since the list will vary everytime, so will the list indexes. In that case rptA will print no matter if it is in the list or not.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top