Filter a report based on combox value

  • Thread starter Thread starter Paul Washburn
  • Start date Start date
P

Paul Washburn

I have a form with a combobox that is supposed to open a report and filter
the report based on the value of the combo box.

The issue im having is the button opens a prompt and puts the value of the
combobox as the text of the prompt. A user can enter the same value into the
prompt and the report will open with the filter in place.

Below is my code for the open command, could someone please tell me if my
syntax is off or if i have an error in logic.

Private Sub cmdRun_Click()
DoCmd.OpenReport "ManuQuery", acViewReport, , "Software.Manufacture LIKE
" & Forms!ManuRpt!cboManufacture, acWindowNormal

End Sub


Thanks in advance for the help.
 
The pop up is the issue, there should not be one. The idea of the form is to
have the user select the company they want and then when the button is
pressed the report runs displaying only instances of that company.

For some reason when mine runs it puts the company name into a prompt,
instead of just passing the value on to the report itself.
 
Found a work around,

Designed a query and set the criteria for the field in question to (=
Form!Formname!Field). Then designed a report off the query and had the
button call the report without any filter criteria.
 
Back
Top