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

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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


.



Relevant Pages

  • RE: Slow Combobox Results
    ... with updating. ... The form has several cascading combos and the last one is slowing the form ... cboFilterState ... The data in the combo is based on a query which narrows down location by the ...
    (microsoft.public.access.formscoding)
  • [Forms]![frmNameOfForm].[cboControlName]
    ... In a login form with 2 cascading combos. ... used in a query to subselect matching records. ... query criteria for yet another field. ...
    (microsoft.public.access.queries)
  • Re: Slow Combobox Results
    ... I just modified the query that cboLocalityFilter was based on. ... When it was just the state it ran fine with almost no noticeable delay. ... cboFilterLocality Row Source based on year? ... The form has several cascading combos and the last one is slowing the ...
    (microsoft.public.access.formscoding)
  • Re: [Forms]![frmNameOfForm].[cboControlName]
    ... > In a login form with 2 cascading combos. ... > used in a query to subselect matching records. ... > York"). ... > query criteria for yet another field. ...
    (microsoft.public.access.queries)
  • Re: [Forms]![frmNameOfForm].[cboControlName]
    ... > In a login form with 2 cascading combos. ... > used in a query to subselect matching records. ... > York"). ... > query criteria for yet another field. ...
    (microsoft.public.access.queries)