Query not pulling parameter value from combo box

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
 
G

Guest

Never mind -- I see that I had a default value set in the FindRegion combo box.

Allan
 

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

Similar Threads


Top