Table Level Data Validation

G

Guest

Hi Everyone,

I have two dates in my table: Date Received, Date Completed. I want to
ensure they are never in the future, but they are not required fields.

I used <=Date() for my Validation Rule, but it doesn't work if there are
nulls in the table.

Any suggestions? Thanks.
 
G

Guest

I'm not sure wha you are asking for, If you want to turn them into require
fields then change the Required Property to Yes

Or add to the validation
<=Date() And Is Not Null
 
G

Guest

No, I don't want them to be required fields. BUT - If a date is entered in
the filed, I want it validated at >Today (i.e. <=Date() ) This is mainly to
cover typos of Jan 26 2026 instead of 2006.

I tried IIF([Date] is not null,<=Date()) but it still rejected it.
 
G

Guest

When I put <=Date() in the field validation, If there is no value entered in
the Date field or I delete the date from existed field, it continues wih no
error message, as it should, because it is not required.

What do tou want to happen in that case, if the value is deleted?

--
Good Luck
BS"D


Jessica said:
No, I don't want them to be required fields. BUT - If a date is entered in
the filed, I want it validated at >Today (i.e. <=Date() ) This is mainly to
cover typos of Jan 26 2026 instead of 2006.

I tried IIF([Date] is not null,<=Date()) but it still rejected it.

Ofer Cohen said:
I'm not sure wha you are asking for, If you want to turn them into require
fields then change the Required Property to Yes

Or add to the validation
<=Date() And Is Not Null
 
C

Carter

try only <=now() for the validation reason

the "not required" will allow the nulls.
 
C

Carter

try only <=now() for the validation reason

the "not required" will allow the nulls.
 
G

Guest

Ok, I don't know why it isn't working. Does it have anything to do with me
using Access 1997?

I've set my Requred: No and Validation Rule: <=Now(), but I get an error
message if I try to leave this field blank. The message only pops up when I
try to change records.

Any other suggestions?
 

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

Similar Threads


Top