G
Guest
I have a form which the user selects a value from a combo box that gets
passed to multiple queries. The problem is that sometimes the values get
passed to the queries and other times it doesn't. Here is a snippet of the
sql query:
WHERE (((tblBranch.Branch_Region_ID)=forms!frmSelect!FindRegion) And
((forms!frmSelect!FindBranch) Is Null)) Or
(((tblBranch.AcctSegValue)=forms!frmSelect!FindBranch) And
((forms!frmSelect!FindRegion) Is Null)) Or (((forms!frmSelect!FindBranch) Is
Null) And ((forms!frmSelect!FindRegion) Is Null))
If I open the form and select nothing (Branch & Region are null) or select a
branch, my report is blank. If I select a region, I'll get results. If I
then clear the region combo box and select a branch, THEN I get the branch
results. And finally, if I then clear the branch combo box and leave both
boxes null, I get the total company.
How do I have the queries obtain the values without going through a sequence
of of selections?
TIA.
Allan
passed to multiple queries. The problem is that sometimes the values get
passed to the queries and other times it doesn't. Here is a snippet of the
sql query:
WHERE (((tblBranch.Branch_Region_ID)=forms!frmSelect!FindRegion) And
((forms!frmSelect!FindBranch) Is Null)) Or
(((tblBranch.AcctSegValue)=forms!frmSelect!FindBranch) And
((forms!frmSelect!FindRegion) Is Null)) Or (((forms!frmSelect!FindBranch) Is
Null) And ((forms!frmSelect!FindRegion) Is Null))
If I open the form and select nothing (Branch & Region are null) or select a
branch, my report is blank. If I select a region, I'll get results. If I
then clear the region combo box and select a branch, THEN I get the branch
results. And finally, if I then clear the branch combo box and leave both
boxes null, I get the total company.
How do I have the queries obtain the values without going through a sequence
of of selections?
TIA.
Allan