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

use a table of reports and a filter form to run reports

Status
Not open for further replies.

kpal29

Technical User
Feb 8, 2003
147
DK
I have a table that lists reports

I have a form that has comboboxes that are used as criteria for the queries underlying the reports

I have added the table of reports as a sub-form to my criteria form.

I have a button on the form.

I would like to select a record from the subform table that will open the report selected.

I know I need some varitm VB...
 
Working on the assumption that this is Access VBA rather than a table in Word, it will (if I understand you correctly)

DoCmd.OpenReport frmCriteria.Form!sfrmReports.cboReportlist.Value, acViewPreview, Whereclause:="Field='" & me.cboCombo1 & "'"

Basically
- the first parameter is the control on the subform with the report name
- The second is the constant to tell it to open in print preview mode (or it will come out of your printer)
- the third is a where clause based on one of the combo boxes

You will need to change the controls to those in your application.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top