Parse Multiple User-Defined Criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need a query that will parse multiple user-defined criteria from an unbound
form control…for example:

“CA†Or “FL†Or “NYâ€
<>â€TX†And <>â€UTâ€

In my criteria pane I have:

[Forms]![myForm]![myControl]

The query results in no records. But functions correctly if I enter only
one state.
 
For multiple <> on the same field the Where clause needs to look like this

WHERE (((table.[table id])<>454 And (table.[table id])<>455))

yours looks like

WHERE (((table.[table id])<>454 And <>455))

The criteria box does this conversion for you during design but not at
runtime. I'd suggest u read this.

http://www.fontstuff.com/access/acctut15.htm

HTH
Martin
 
Back
Top