Critiria not working?

Destiny

Registered User.
Local time
Today, 22:57
Joined
Aug 8, 2008
Messages
10
I have a strange problem.
Must be my error otherwise it means that Access is quite stupid...

I have 4 fields in the querry - Quote, Payment1, Payment2, Payment3. All being number/currency type.
In that querry I want to display only records which fall into this rule
Quote <> Payment1 + Payment2 + Payment3

Does it matter that Payment2 and Payment3 might sometimes be empty?

I used following critiria under Quote:
<>[1st Payment]+[2nd Payment]+[3rd Payment]
which did not work ok. (showing no records or only 1 where all 3 payments had something entered)

So I divided this into 3 separate critiria:
Quote <> Payment1
OR
Quote <> Payment1 + Payment2
OR
Quote <> Payment1 + Payment2 + Payment3

It works fine although it also displays a record that has Quote = 310, Payment1 = 300, Payment2 = 10, which it shouldnt.

Can anybody advise on this matter?
 
Ekhm.
Got is sorted :) Sorry for the trouble :)

Just added 'Is Null' for Payment2 & 3 in 1st critiria and for Payment3 for 2nd critiria :)
 
I have a strange problem.
Must be my error otherwise it means that Access is quite stupid...

I have 4 fields in the querry - Quote, Payment1, Payment2, Payment3. All being number/currency type.
In that querry I want to display only records which fall into this rule
Quote <> Payment1 + Payment2 + Payment3

Does it matter that Payment2 and Payment3 might sometimes be empty?

I used following critiria under Quote:
<>[1st Payment]+[2nd Payment]+[3rd Payment]
which did not work ok. (showing no records or only 1 where all 3 payments had something entered)

So I divided this into 3 separate critiria:
Quote <> Payment1
OR
Quote <> Payment1 + Payment2
OR
Quote <> Payment1 + Payment2 + Payment3

It works fine although it also displays a record that has Quote = 310, Payment1 = 300, Payment2 = 10, which it shouldnt.

Can anybody advise on this matter?
Adding Null records to non Null records, returns a NUll value. Try the following as the criteria instead:

<> Nz(Payment1,0) + Nz(Payment2,0) + Nz(Payment3,0)
 

Users who are viewing this thread

Back
Top Bottom