Validation rules while entering in a form.

M

Micky

I have the following expression in a tables validation
rule.
([UNITS PAID FOREMAN]>0 And [INVOICE UNIT PRICE]>0) Or
([UNITS PAID FOREMAN] Is Null And [INVOICE UNIT PRICE] Is
Null) Or ([UNITS PAID FOREMAN]=0 And [INVOICE UNIT PRICE]
=0)
All data is entered into the table from a form. It works
for the most part, except for the Nulls. This will only
make sure things are in tact if there is a value in both
columns. If you leave one null then it says it is OK
even though the other has a value. For other reasons I
really do not want to not allow a null value. Any way to
validate this?

Thanks in advance?
 
T

TC

Micky said:
I have the following expression in a tables validation
rule.
([UNITS PAID FOREMAN]>0 And [INVOICE UNIT PRICE]>0) Or
([UNITS PAID FOREMAN] Is Null And [INVOICE UNIT PRICE] Is
Null) Or ([UNITS PAID FOREMAN]=0 And [INVOICE UNIT PRICE]
=0)
All data is entered into the table from a form. It works
for the most part, except for the Nulls. This will only
make sure things are in tact if there is a value in both
columns. If you leave one null then it says it is OK
even though the other has a value. For other reasons I
really do not want to not allow a null value. Any way to
validate this?

Thanks in advance?


NZ ( [UNITS PAID FOREMAN] , 0 ) >0 etc.
^^^^^^ ^^^^^^

TC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top