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

Showing a report from a listbox

Status
Not open for further replies.

laurensuzy

Technical User
Joined
Jul 14, 2002
Messages
1
Location
US
I have created a simple 3-table database for an (imaginary) catering firm. I have created reports for each party, so the caterer can print it out to know how many of each meal to prepare, etc.

I'm using forms to open these reports. The first form has a menu that has buttons, "Print Menu List", "Print Guest List" etc, and each button is connected to another form where the user chooses the party and will then choose "See Report". On that form I created a listbox (connected with the "Events" table) to list the parties available for each report. How do I connect a button that will open the selected party report from the listbox?

Thanks!
 
Hi,

Usualy what i do is i create a table call REPORT with these fields in it
rpt_ID
rpt_File
rpt_Desc
rpt_Title
rpt_Cat_ID
...
...

you can also add a bunch of Yes/No field that will indicate if the report can be filter by name, date...

in your listbox, you select everything and display only the rpt_Title and you can put rpt_Desc in a label. So when the user press the button you can use rpt_File:

(assuming that rpt_File is the second field in your sql statement)
ex: docmd.openreport lstReport.column(1)

hope it can help
Mal'chik [bigglasses]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top