PC Review


Reply
Thread Tools Rate Thread

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

 
 
Jodi J
Guest
Posts: n/a
 
      31st Mar 2008
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
--
Jodi
 
Reply With Quote
 
 
 
 
Allen Browne
Guest
Posts: n/a
 
      31st Mar 2008
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

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Jodi J" <(E-Mail Removed)> wrote in message
news:F260F032-83BA-4A0B-9B37-(E-Mail Removed)...
> 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
> --
> Jodi


 
Reply With Quote
 
KARL DEWEY
Guest
Posts: n/a
 
      31st Mar 2008
>>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.
--
KARL DEWEY
Build a little - Test a little


"Jodi J" wrote:

> 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
> --
> Jodi

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determine if a month falls between two dates. Robert R Microsoft Excel Worksheet Functions 4 13th Jan 2010 02:22 AM
formula to determine whether a date falls between two dates lolan7 Microsoft Excel Misc 7 19th Feb 2009 12:05 AM
determine which time interval the date falls into Aivars Microsoft Access Queries 6 26th Feb 2007 08:32 PM
Formula to determine whether number falls within range?? =?Utf-8?B?Q2F0?= Microsoft Excel Worksheet Functions 4 17th Sep 2005 03:01 AM
Oracle OleDB and high precision NUMBER fields --> DBTYPE_VARNUMERI =?Utf-8?B?TWljaGFlbA==?= Microsoft ADO .NET 0 14th Sep 2004 08:27 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:51 PM.