Multiple range query

bg18461

Registered User.
Local time
Today, 02:26
Joined
Dec 12, 2006
Messages
39
How do you put multiple ranges in a query or can you even do this.

example

I want values between 1400 and 1599 as well as values 1800 and 1870

I was thiking something like

Code:
Between "1400" And "1599" and Between "1800" And "1870"

but no go. Any help?
 
For starters, a value couldn't be in both ranges, so I think you want OR. In SQL view, it would look like:

WHERE FieldName Between "1400" And "1599" OR FieldName Between "1800" And "1870"

In design view, you'd place the second between on the line under the first.
 
In design view, you'd place the second between on the line under the first.
You don't have to do that. If you don't, Access will parse it for you. You can have the whole criteria as one line in the design view. ;)
 

Users who are viewing this thread

Back
Top Bottom