Combo Box partially working

jketcher

Registered User.
Local time
Today, 02:09
Joined
Apr 15, 2009
Messages
77
I have a new project. This time I am using several combo boxes but will be happy if I can get the first one to work for now. It is unbound and has three selections that will be used as criteria for a query that displays output in a subform on the same form. I think this is a very basic scenario.

Looks like: Recipient: DFA
CEO
CEO or DFA


The only selection that is working right now is 'CEO'. If that one is working, I think the other two should also. If I run a separate query on the selections it works fine. I tried switching the order to see if it is a positional issue, but that is not it. If I make the combo box 'bound', it won't let me update anything or make selections from the drop down.

I tried attaching screen shots but the file was too large.

Thanks for your help.

jketcher
 
OK -- so no one responded to this but I got it working -- to an extent. I still need some help though.

How do I code or set up the combo box to work with three choices as criteria for a query? The two choices to select specific data are working but the choice to select all of the data is not. I tried setting it up as "", *, 'All' with an event on after update to some VBA code that I don't know how to code. Not sure the best approach. Would greatly appreciate your help. There will be other combo boxes when the form is finished so the user will have many options for selection criteria. How do I get it to automatically select all for a field that has a combo attahed to it?

Thanks, Jketcher
 
Add the combobox as a field in your query.
Repeat the existing lines.
Against the repeated line enter the criteria for the combo as "All" and remove the filtering criteria for the matching field.
In the original line enter <>"All".

Unfortunately the number of lines in the query exponentiates as the number of combos increases as you have to provide for all combinations.
 
Oh -- I am not following. Do you have an example I could look at. Would it be easier to do this in VBA?
 
I opened your example and couldn't get it to work. Would this be easier to do in VBA? I sent a question to the VBA group. I hope it isn't a problem if I seek help in different categories for the same problem. I am having trouble with my VBA syntax and am not getting a response. Very stuck right now. I wish I understood this. :confused:
 
Thanks jketcher and Galaxiom! I was contemplating this very problem. Galaxiom, your explanation and sample db made perfect sense! Cheers, ad
 
OK -- I think I understand that part. Now running into new issue. One of my five combo boxes has to check against numeric data in a table. The choices I gave (this if for college enrollment count) are:

>0
<500
<1000
<5000 etc.

I was hoping that it would compare equally to the data in the table but think it isn't because the combo box data is text and the table data is numeric. How do I set this up so that it will select the correct populations of students? Do I need to change the related table field to text?

Thanks, jketcher
 

Users who are viewing this thread

Back
Top Bottom