[Forms]![frmNameOfForm].[cboControlName] -- need help w/ exception

T

Tom

In a login form with 2 cascading combos. Their selected values will be
used in a query to subselect matching records. I use the following strings
in my query criteria:
- [Forms]![frmLogin].[cboState]
- [Forms]![frmLogin].[cboCity]

This process works fine and I get the proper results.

However, I am now dealing w/ a unique scenario. Let's say the 2 selected
values for cboState and cboCity are identical (e.g. "New York" | "New
York").

In this case, I don't want to find the records where New York exists in
field "State" AND field "City". Instead, I want to use "New York" as the
query criteria for yet another field (let's call this field "Exception").

Is there a way to create a smart query or SQL code that does look at the
values in both combos? And again, if they are the same, use either
selected value (State or City) as the criteria for a 3rd field.

Any suggestion how this could be accomplished?

Tom
 
M

[MVP] S.Clark

Using VBA, you can accomplish almost anything. You could write some code to
analyze the entry and react accordingly.
 

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