Form to query interace....

  • Thread starter Thread starter Scott Matheny
  • Start date Start date
S

Scott Matheny

I'm trying to use a form to make a generic query that
contains all the fields from a couple of my tables. How
can I distinguish between a value of [] and no value at
all. Meaning, can the query ignore the parameter if it is
blank instead of reading no input as looking for null
values.

Thanks in advance,
-Scott M.
 
Dear Scott:

You do this by making specific reference to null values in the logic
of the criteria you build. Such as:

WHERE (SomeColumn = 'hello' OR SomeColumn IS NULL) AND . . .

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
using....

Like [Forms]![ReportParameters]![EnterUserID] & "*"


Or similar. This will allow a partial userid (in my example) to be entered
and it will match based on the letters entered. Leaving the field blank
would pull all...


SMI would give you Like "SMI*"
would give you Like "*"


Rick B



I'm trying to use a form to make a generic query that
contains all the fields from a couple of my tables. How
can I distinguish between a value of [] and no value at
all. Meaning, can the query ignore the parameter if it is
blank instead of reading no input as looking for null
values.

Thanks in advance,
-Scott M.
 
Back
Top