CBO query issue

chrisjames25

Registered User.
Local time
Today, 14:04
Joined
Dec 1, 2014
Messages
404
Hi

I have 3 comboboxs. FOr ease lets go with Country > State > City

Obviously when i choose an option in Country cbo it then populates the options available in the State cbo and then when i choose option in state in populates option available in City cbo.

What i want to achieve is to allow the user to skip having to choose a state if they dont want to.

SO basically i want after choosing country in country cbo for the user to be able to choose a state in state cbo or go straight to city cbo and choose a city.

I requery both cbo state and city after update in cbo country however it does not populate options in cbo city.

I have attached a snapshot of the query bulider. I beleive the issue is that it cant cope with a null value in the Tier2ID section but any thoughts would be appreciated.
 

Attachments

  • Capture.JPG
    Capture.JPG
    33.2 KB · Views: 66
Add
OR [Forms.your.formRef...] Is Null
to the city criteria.
 
you need separate rowsource for each combo:

combo1:
select tier3_id,tier3 from tbl_tier3;

combo2:
select tier1_id from tbl_tier3 where tier3_id = forms!Form_tier3Edit1![cboTier1]

combo3:
select tier2_id from tbl_tier3 where tier3_id = forms!Form_tier3Edit1![cboTier1] and [tier1_id]=iif(isnull(forms!Form_tier3Edit1![cboTier2]),[tier1_id], forms!Form_tier3Edit1![cboTier2])

you also need to requery combo2 when you Update combo1, requery combo3 when you update combo2
 
OK somehow now not working. It seems to have amended my code to the attached image and doesn't work
 

Attachments

  • Capture3.JPG
    Capture3.JPG
    46.7 KB · Views: 63

Users who are viewing this thread

Back
Top Bottom