Query - between and

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I have made a simpel selectquery to let the user choose which names he wants from a list

Between [from] And [to

Lets say a name list with the names from Albert, Bertha, Circus, Hannah, Thomas, Wendy. When the user ente
From name:
To name:
he gets the names:Albert, Bertha, Circus but not the names with H
and how should he then get the names with the last character
he never gets the names with W on his list
How to include the last names?
 
To a computer, the string
Ha
is greater than the simple H. It does not fit between A and H, because it
comes after H. To ask for all the names between A and H inclusive you need
something like this:
Between "A" And "Hzzzzzzz"

Try:
Between [from] And [to] & "zzzzzz"

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Hanne said:
Hi,
I have made a simpel selectquery to let the user choose which names he wants from a list.

Between [from] And [to]

Lets say a name list with the names from Albert, Bertha, Circus, Hannah,
Thomas, Wendy. When the user enter
 
Thanks, off course I should write " & "zzzzzzzzzzzz" in the end - that was the point I didn't think about

----- Allen Browne skrev: ----

To a computer, the strin
H
is greater than the simple H. It does not fit between A and H, because i
comes after H. To ask for all the names between A and H inclusive you nee
something like this
Between "A" And "Hzzzzzzz

Try
Between [from] And [to] & "zzzzzz

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

Hanne said:
Hi
I have made a simpel selectquery to let the user choose which names h wants from a list
Between [from] And [to
Lets say a name list with the names from Albert, Bertha, Circus, Hannah
Thomas, Wendy. When the user ente
 
Back
Top