Multipale combox lists to filter a report

jgb

New member
Local time
Today, 06:45
Joined
Nov 28, 2011
Messages
8
I’m trying to make a form with 4-combox lists to run a report.
I get all my data from one table with 4 columns called Vender, PO Number, Part Number and Defects.
The problem I am having is that report only gives me the specific Vender that I choose from the Vender combox with all the data from the other three columns. The other comboxes let me select the PO Number, Part number and Defects for that specific Vender but when I run the report it did not filter what I selected from my comboxes called PO Number, Part number and Defects.

I am running MS Access 2002.
[FONT=&quot]Any help will be great.
Thanks,
jgb.
[/FONT]
 
What is the source of the report and the code that opens the report?
 
Here is the code to open the report –
On Click [Event Procedure]
Private Sub Command11_Click()
DoCmd.OpenReport "qrytbqaincomingerrors", acViewPreview
End Sub

Here is the code for the Vender combobox -
After Update [Event Procedure]
Private Sub CmbVender_AfterUpdate()
Me.CmbPONumber = vbNullString
Me.CmbPONumber.Requery

Me.CmbPartNumber = vbNullString
Me.CmbPartNumber.Requery
End Sub

The other comboboxes do not have any Events.

I have attached the data base I'm working on.

[FONT=&quot]Thanks[/FONT]
 

Attachments

The only field in the report's source query with a criteria is the vendor field. You would need criteria for the others to have them filtered.
 
[FONT=&quot]Thanks for the info.
Is there a tutorial on the web to show me how to set a criteria for the others to have them filtered?


[/FONT]
 
Could be, but I'm not aware of one. It should look the same as the existing one, but on the other fields and referring to their respective combo.
 
Thanks again for the fast help. I'll try it today.
 
No problem; post back if you get stuck.
 
I’m still in the weeds.
Is the following codes correct – where do I put them?

Vender
DoCmd.OpenReport "qrytbqaincomingerrors", acViewPreview, "Vender = ‘" & Me.CmbVender & "’"

PO Numbers
DoCmd.OpenReport "qrytbqaincomingerrors", acViewPreview, "PONumber = #" & Me.CmbPONumber & "#"

Part Number
DoCmd.OpenReport "qrytbqaincomingerrors", acViewPreview, "PartNumber = #" & Me.CmbPartNumber & "#"

Thanks
 

Users who are viewing this thread

Back
Top Bottom