Determine if a number falls between two numeric fields (low/high)

J

Jodi J

Requirement is for the user to enter a range of numeric data, low to high.
Purpose of the range is to save data entry time when entering a record.
Instead of entering1,2,3,4.... in up to 99 fields, the user can enter "1" and
"47" into a low and high field. Later, the user needs to select the record
if a specified number falls within this range.
1. Can I, and if so how do I determine (via query?) whether a specified
number falls between the low and high range?
2. Is my assumption that the data has to be stored as numeric in two
separate fields correct?

I have tried creating one text field (1-47) and two numeric fields (1 47)
but either way, I simply don't know how to determine if the specified number
falls between the low and high values.
Thanks much in advance
 
A

Allen Browne

If you use 2 numeric fields named (say) Lo and Hi, you can type an
expression like this in the Criteria row of a query:
Between [Lo] And [Hi]

If these a contiguous ranges (no gaps, no overlaps), it would be better to
store one field only (say the low value) , and then use a query to get the
other one. It takes a bit of effort, but reduces errors. Tom Ellison
explains how:
Lookup a value in a range
at:
http://allenbrowne.com/ser-58.html
 
K

KARL DEWEY

Instead of entering1,2,3,4.... in up to 99 fields, the user can enter "1"
and "47" into a low and high field.
Are you talking about your database having 99 fields or a form with 99 text
boxes?

Give some more details of how what you are trying to do.
 

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