Thankyou for the information. Now I'm stuck once more.
The values may have a letter so I've created the High & Low fields as text data types.
How would I ned to adjust this statement to work for text fields?
WHERE [Low] <= [Enter target:] AND [High] >= [Enter target:]
"John Vinson" wrote:
[Quoted Text] > On Thu, 3 Aug 2006 13:39:01 -0700, Tparis > <Tparis[ at ]discussions.microsoft.com> wrote: > > >If a field contains a range of values (example: 12345-67890). I have a > >parameter query which needs to pull this record if the number entered falls > >in the middle of the range (example: pull all records for 12348). Can this > >be done? if so, how? > > Your field is not "atomic". A field should contain only one value! > > If you need a range, a better design would be to have two fields, Low > and High, with 12345 and 67890 respectively. You could then use a > criterion > > WHERE [Low] <= [Enter target:] AND [High] >= [Enter target:] > > With your current composite field you'll need a more complex, and much > less efficient query like > > WHERE Val(Left([range], InStr([range],"-")-1)) <= [Enter target:] > AND Val(Mid([range], InStr([range],"-")+1)) >= [Enter target:] > > > John W. Vinson[MVP] > >
|