between or >= and <=

TjS

Registered User.
Local time
Today, 11:44
Joined
Jul 18, 2007
Messages
126
I have a query where the following expression is used on one field name (in a form selected by two comboboxes named "name_from" and "name_till"

>=[Forms]![Selection]![NAME_FROM] And <=[Forms]![Selection]![NAME_TILL]

Suppose there are five names:
Aaaa
Baaa
Caaa
Daaa
Eaaa

and i select in the first combobox (name_from) Aaaa and in the last one (name_till) Daaa then the result is: Aaaa, Baaa, Caaa, Daaa

But when i select in the first combobox (name_from) Aaaa and in the last one (name_till) Aaaa also, then the result is: #Error.

This i don't understand the expression used is not an in between expression, but still the result acts like one(!?)

Can anyone help me with this please?
 
Last edited:
Sorry....made a mistake in my example...

if the last one (name_till) is Daaa then the result will be Caaa......

So in my opinion, it seems that >= and <= acts like > and < (?)
 
Sorry but it works fine for me. I don't get an error with the parameters both set to "Aaaa" and I do find that >= and <= behave as you would expect. In short, I can't reproduce your error.
 
i have tried several options (<=, <, between); but it still results in information between the given parameters.

Is there maybe something i overlooked?
1) comboxes name_from and name_till
2) query is available where in the fieldname the condition as mentioned is written
3) the report has his the same query in his property....

Thanks in advance !
 
Can you post a stripped down copy of your db?
 
db

uploading a stripped version of my db is of course possible, but all is in dutch... (except the VB Language and parts of the expressions of course :D )

I appreciate your help, i will first look further in the db (have to make other forms/parts in the db first and then i will come back to the selection problem).

Thanks for the advice in advance though!
 
I'm perfectly capable of reading Dutch. I don't understand what I'm reading, though!:D
 
i didn't fully read your problem so this might not be too useful, but FYI, the Between keyword is inclusive, so: Between 4 and 6 is the same as >=4 and <=6. (result: 4, 5, 6; not 5).
 
Thanks for the advice and answers
 

Users who are viewing this thread

Back
Top Bottom