T
tbmarlie
I have a drop down on my form that is based on a fairly complex
query. Basically the drop down will allow values to show based on
whether or not the other drop downs have been picked or not. Here is
the code:
SELECT Tbl_A01_CrossRef_for_combos.Co, Tbl_A01_CrossRef_for_combos.[Co
Name], Tbl_A01_CrossRef_for_combos.[Tax ID State],
Tbl_A01_CrossRef_for_combos.Co
FROM Tbl_A01_CrossRef_for_combos
WHERE ((([Forms]![frm_Main]![Cbo_State]) Is Null) AND (([Forms]!
[frm_Main]![Combo_TaxType]) Is Null) AND (([Forms]![frm_Main]!
[Txt_TaxId]) Is Null) AND (([Forms]![frm_Main]![Txt_Year]) Is Null))
OR ((([Forms]![frm_Main]![Cbo_State]) Is Not Null) AND (([Forms]!
[frm_Main]![Combo_TaxType]) Is Null) AND (([Forms]![frm_Main]!
[Txt_TaxId]) Is Null) AND (([Forms]![frm_Main]![Txt_Year]) Is Null)
AND ((Tbl_A01_CrossRef_for_combos.State)=[Forms]![frm_Main]!
[Cbo_State])) OR (((Tbl_A01_CrossRef_for_combos.[Tax ID
State])=[Forms]![frm_Main]![Txt_TaxId]) AND (([Forms]![frm_Main]!
[Cbo_State]) Is Not Null) AND (([Forms]![frm_Main]![Combo_TaxType]) Is
Not Null) AND (([Forms]![frm_Main]![Txt_TaxId]) Is Not Null) AND
(([Forms]![frm_Main]![Txt_Year]) Is Not Null) AND
((Tbl_A01_CrossRef_for_combos.State)=[Forms]![frm_Main]![Cbo_State])
AND ((Tbl_A01_CrossRef_for_combos.[Tax Type])=[Forms]![frm_Main]!
[Combo_TaxType])) OR (((Tbl_A01_CrossRef_for_combos.Co) Is Null) AND
((Tbl_A01_CrossRef_for_combos.[Tax ID State])=[Forms]![frm_Main]!
[Txt_TaxId]) AND (([Forms]![frm_Main]![Cbo_State]) Is Not Null) AND
(([Forms]![frm_Main]![Combo_TaxType]) Is Not Null) AND (([Forms]!
[frm_Main]![Txt_TaxId]) Is Null) AND (([Forms]![frm_Main]![Txt_Year])
Is Not Null) AND ((Tbl_A01_CrossRef_for_combos.State)=[Forms]!
[frm_Main]![Cbo_State]) AND ((Tbl_A01_CrossRef_for_combos.[Tax
Type])=[Forms]![frm_Main]![Combo_TaxType]))
ORDER BY Tbl_A01_CrossRef_for_combos.Co,
Tbl_A01_CrossRef_for_combos.Co;
Well, the users also want to always have the option of being able to
choose a null value in addition to whatever choices show on the drop
down. Is that possible when the row source is based on a query as
apposed to a list. Thanks.
query. Basically the drop down will allow values to show based on
whether or not the other drop downs have been picked or not. Here is
the code:
SELECT Tbl_A01_CrossRef_for_combos.Co, Tbl_A01_CrossRef_for_combos.[Co
Name], Tbl_A01_CrossRef_for_combos.[Tax ID State],
Tbl_A01_CrossRef_for_combos.Co
FROM Tbl_A01_CrossRef_for_combos
WHERE ((([Forms]![frm_Main]![Cbo_State]) Is Null) AND (([Forms]!
[frm_Main]![Combo_TaxType]) Is Null) AND (([Forms]![frm_Main]!
[Txt_TaxId]) Is Null) AND (([Forms]![frm_Main]![Txt_Year]) Is Null))
OR ((([Forms]![frm_Main]![Cbo_State]) Is Not Null) AND (([Forms]!
[frm_Main]![Combo_TaxType]) Is Null) AND (([Forms]![frm_Main]!
[Txt_TaxId]) Is Null) AND (([Forms]![frm_Main]![Txt_Year]) Is Null)
AND ((Tbl_A01_CrossRef_for_combos.State)=[Forms]![frm_Main]!
[Cbo_State])) OR (((Tbl_A01_CrossRef_for_combos.[Tax ID
State])=[Forms]![frm_Main]![Txt_TaxId]) AND (([Forms]![frm_Main]!
[Cbo_State]) Is Not Null) AND (([Forms]![frm_Main]![Combo_TaxType]) Is
Not Null) AND (([Forms]![frm_Main]![Txt_TaxId]) Is Not Null) AND
(([Forms]![frm_Main]![Txt_Year]) Is Not Null) AND
((Tbl_A01_CrossRef_for_combos.State)=[Forms]![frm_Main]![Cbo_State])
AND ((Tbl_A01_CrossRef_for_combos.[Tax Type])=[Forms]![frm_Main]!
[Combo_TaxType])) OR (((Tbl_A01_CrossRef_for_combos.Co) Is Null) AND
((Tbl_A01_CrossRef_for_combos.[Tax ID State])=[Forms]![frm_Main]!
[Txt_TaxId]) AND (([Forms]![frm_Main]![Cbo_State]) Is Not Null) AND
(([Forms]![frm_Main]![Combo_TaxType]) Is Not Null) AND (([Forms]!
[frm_Main]![Txt_TaxId]) Is Null) AND (([Forms]![frm_Main]![Txt_Year])
Is Not Null) AND ((Tbl_A01_CrossRef_for_combos.State)=[Forms]!
[frm_Main]![Cbo_State]) AND ((Tbl_A01_CrossRef_for_combos.[Tax
Type])=[Forms]![frm_Main]![Combo_TaxType]))
ORDER BY Tbl_A01_CrossRef_for_combos.Co,
Tbl_A01_CrossRef_for_combos.Co;
Well, the users also want to always have the option of being able to
choose a null value in addition to whatever choices show on the drop
down. Is that possible when the row source is based on a query as
apposed to a list. Thanks.