combo box on form with 3 choices....

C

CJL

I have created a form with three pull down seletcions linking 3 tables:
region, property type and specialty. It is set to return all if no choice is
made for a category. The query runs, but it seems to only follow the rule
for the first option, which is region. For example, If I select North
America and leave the other two blank, I get the list for N.A. If I select
one of the other options only, the query gives me everything, ignoring what I
selected. My parameters for my query are: [Forms]![Consultant Query
Form]![Region] & "*" Help?
 
J

Jackie L

Are you requerying the combo boxes after each choice?

For instance, on the AfterUpdate event of your first option, you need to put
Me.NameofSecondOption.Requery
Me.NameofThirdOption.Requery
 
C

CJL

Thanks, Jackie. I did the following:

Private Sub Region_AfterUpdate()
Me.Property_Type.Requery
Me.Firm_Category.Requery

End Sub

It still doesn't sort appropriately. Seems like there must be an easy
solution, but I'm obviously missing something.


Jackie L said:
Are you requerying the combo boxes after each choice?

For instance, on the AfterUpdate event of your first option, you need to put
Me.NameofSecondOption.Requery
Me.NameofThirdOption.Requery



CJL said:
I have created a form with three pull down seletcions linking 3 tables:
region, property type and specialty. It is set to return all if no choice is
made for a category. The query runs, but it seems to only follow the rule
for the first option, which is region. For example, If I select North
America and leave the other two blank, I get the list for N.A. If I select
one of the other options only, the query gives me everything, ignoring what I
selected. My parameters for my query are: [Forms]![Consultant Query
Form]![Region] & "*" Help?
 
J

Jackie L

First of all, the example you gave in the beginning only shows the first
field as your criteria. Do you need to limit the query by the second and
third fields? What do you mean by sorting appropriately? The sort for the
query should be set up in the query itself. The sort for the combo boxes and
be set in the SQL on the combo box or on a separate query if that is the
source for the drop down.

Can you be more specific on your needs?


CJL said:
Thanks, Jackie. I did the following:

Private Sub Region_AfterUpdate()
Me.Property_Type.Requery
Me.Firm_Category.Requery

End Sub

It still doesn't sort appropriately. Seems like there must be an easy
solution, but I'm obviously missing something.


Jackie L said:
Are you requerying the combo boxes after each choice?

For instance, on the AfterUpdate event of your first option, you need to put
Me.NameofSecondOption.Requery
Me.NameofThirdOption.Requery



CJL said:
I have created a form with three pull down seletcions linking 3 tables:
region, property type and specialty. It is set to return all if no choice is
made for a category. The query runs, but it seems to only follow the rule
for the first option, which is region. For example, If I select North
America and leave the other two blank, I get the list for N.A. If I select
one of the other options only, the query gives me everything, ignoring what I
selected. My parameters for my query are: [Forms]![Consultant Query
Form]![Region] & "*" Help?
 

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