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!

reports in combo box then print 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi
How can i list all my reports in a combo box for printing when selected.
Ta
Alan
 
I know there is a way to get the names and populate a list programmatically so you don't have to maintain a table (I can't remember where I saw this) but I often do the same thing and instead of doing it programmatically I make a table (tblReports) and put in two fields usually ReportName (text), ReportDescription (text). The report name is your primary key and the name of the report. I use the description to describe the report (imagine that!) and sometimes to provide sort order by placing 1), 2), 3) etc.. at the front of the description. Then make a combo on your form and base it on the table with the report names with the ReportName field as the bound column. The final step is modifying the open report command in vb, and if you use the Access wizard to call your report you'll find a line in the code where it says:

stDocName = "YourReportName"

delete "YourReportName" and make the line like so:

stDocName = Me![YourComboName]

Now the code will look at your combo name and pull the report that is selected in your combo box! Fun is eh?
Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top