This seems simple enough, but I am having problems.
I have a table of customer information. I have a form with various combo boxes displaying unique customer information (in this case, zone and broker, but I'll add others before it is done.
I want each user to choose what they want out of the combo boxes, then hit the command button, which will display the results on a customized form. If they choose both combo boxes, it works gerat.
The problem I am having that if the user just chooses zone, but nothing in broker, it display no results. I thought adding an " All" to each would cure that, but it has not, but I don't think I am doing it correctly.
I'll show exactly what I have so far. For the Broker Combo Box I have as my row source:
My column count is 2, column width is 0", 2".
This brings an option in my combo box with the name All, but if you choose that and hit the command button, no results are displayed.
The code I have in the command button is:
Now I think my problem is that all I have done is add the All option to the combo box, but I need something else to tell it to actually show all.
Maybe something in the After Update section, but I don't know what!
Please help!!!
Thank you!
I have a table of customer information. I have a form with various combo boxes displaying unique customer information (in this case, zone and broker, but I'll add others before it is done.
I want each user to choose what they want out of the combo boxes, then hit the command button, which will display the results on a customized form. If they choose both combo boxes, it works gerat.
The problem I am having that if the user just chooses zone, but nothing in broker, it display no results. I thought adding an " All" to each would cure that, but it has not, but I don't think I am doing it correctly.
I'll show exactly what I have so far. For the Broker Combo Box I have as my row source:
Code:
SELECT BROKER As Filter, BROKER FROM CUSTOMERS UNION SELECT "*" As Filter ," All" As BROKER FROM CUSTOMERS ORDER BY BROKER;
This brings an option in my combo box with the name All, but if you choose that and hit the command button, no results are displayed.
The code I have in the command button is:
Code:
Private Sub Command5_Click() DoCmd.OpenForm "ALLCUSTOMERSFORM", , , "[BROKER] = '" & Me![Combo1].Column(0) & "' AND [ZONE] = '" & Me![Combo2].Column(0) & "'" End Sub
Maybe something in the After Update section, but I don't know what!
Please help!!!
Thank you!
Comment