Filter a report based on combox value

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.
 
P

Paul Washburn

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.
 
P

Paul Washburn

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top