Form Level Validation Rull Doesn't Recoginize Null

G

Guest

I two dates on a form used to enter and update a table. The following form
level validation rule is on the Date Completed field
[Date Received] Or =[Date Received] Or =Null

If the user leaves the Date Received blank and enters the Date Completed the
validation rule is invoked. If the user then clears the date in the Date
Completed with the delete key, the rule is still invoked. How do I have to
format the rule so that the user can overcome entering the Date Completed
when they didn't intend to, or entered the Date Completed prior to entering
the Date Received?

Thank you in advance for your help.

Terri
 
G

George Nicholson

Null cannot be compared, just evaluated. "x = Null" will always be Null, no
matter what x is. Even "Null = Null" returns Null.

... =[Date Received] Or Is Null

--
HTH,
George

Terri said:
I two dates on a form used to enter and update a table. The following form
level validation rule is on the Date Completed field
[Date Received] Or =[Date Received] Or =Null

If the user leaves the Date Received blank and enters the Date Completed
the
validation rule is invoked. If the user then clears the date in the Date
Completed with the delete key, the rule is still invoked. How do I have
to
format the rule so that the user can overcome entering the Date Completed
when they didn't intend to, or entered the Date Completed prior to
entering
the Date Received?

Thank you in advance for your help.

Terri
 
G

Guest

Thank you for the information. Do you know of an alternate means of
accomplishing the goal of my validation rule?

George Nicholson said:
Null cannot be compared, just evaluated. "x = Null" will always be Null, no
matter what x is. Even "Null = Null" returns Null.

... =[Date Received] Or Is Null

--
HTH,
George

Terri said:
I two dates on a form used to enter and update a table. The following form
level validation rule is on the Date Completed field
[Date Received] Or =[Date Received] Or =Null

If the user leaves the Date Received blank and enters the Date Completed
the
validation rule is invoked. If the user then clears the date in the Date
Completed with the delete key, the rule is still invoked. How do I have
to
format the rule so that the user can overcome entering the Date Completed
when they didn't intend to, or entered the Date Completed prior to
entering
the Date Received?

Thank you in advance for your help.

Terri
 
D

Douglas J. Steele

He gave you the alternative: use Is Null

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Terri said:
Thank you for the information. Do you know of an alternate means of
accomplishing the goal of my validation rule?

George Nicholson said:
Null cannot be compared, just evaluated. "x = Null" will always be Null,
no
matter what x is. Even "Null = Null" returns Null.

... =[Date Received] Or Is Null

--
HTH,
George

Terri said:
I two dates on a form used to enter and update a table. The following
form
level validation rule is on the Date Completed field

[Date Received] Or =[Date Received] Or =Null

If the user leaves the Date Received blank and enters the Date
Completed
the
validation rule is invoked. If the user then clears the date in the
Date
Completed with the delete key, the rule is still invoked. How do I
have
to
format the rule so that the user can overcome entering the Date
Completed
when they didn't intend to, or entered the Date Completed prior to
entering
the Date Received?

Thank you in advance for your help.

Terri
 

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