Can you use a wildcard in a "Between" parameter

Uvuriel03

Registered User.
Local time
Today, 13:41
Joined
Mar 19, 2008
Messages
115
I have a query where I need to pull up a list of numbers between [First] and [Last]. The thing is, sometimes the last number has a decimal, and sometimes it doesn't. If it does, then I need all of the decimals of that number.

For example:
First = 1
Last = 5

Numbers:
1
2
3
4
5.1
5.2
5.3

So I need it to pull up all of the 5.__s.

My first thought was to try and use a wildcard in the Between statement so that it pulls up all of those numbers as well as all of them in between:

Between ([First ID:] & "*") and ([Last ID:] & "*")

But that doesn't work. Is there any way I can get it to?

Thanks!
 
You'll need to elaborate on what exactly didn't work- did you get any results at all or did you get unwanted results or an error message?
 
In query Design View, you can put >=1 And <6 in the criteria for the Numbers field.

In query SQL View, the Where Clause is
WHERE [Numbers]>=1 And [Numbers]<6

Edited:
For a parameters query, your can use

>=[First] and <[Last]


^
 
Last edited:
Thanks!! I ended up tweaking it a little bit, so now it's

>=[Start] And <[End]+1

That gets anything between the starting number and the ending number plus any decimals of it!

Thanks guys!
 

Users who are viewing this thread

Back
Top Bottom