Validation Rule

bogglebeats

Registered User.
Local time
Today, 20:34
Joined
Dec 19, 2002
Messages
53
I am trying to create a validation rule for a field called session number. I want to make it so a duplicate session number is not able to be selected on my form. I am trying to create the proper validation rule for this by linking it to another field called session date. i would like to do something like:

session number not = session date < current date

i know my syntax is off. can anyone suggest a proper validation rule for the session number field? cheers.

ameen
 
bogglebeats,

I assume that the user is entering the session number.

Use the AfterUpdate event, then use the DLookUp function
to check for a duplicate.

See the Help files for info ...

hth,
Wayne
 
do i use these functions in the 'validation rule' part of the table?
 
ameen,

Use the AfterUpdate event on the txtBox where they enter
the date.

Wayne
 
You should use the BeforeUpdate event, where the update can be cancelled
 
ok. that makes sense. so i shouldn't use afterupdate at all? should i build a macro in the beforeupdate event?
 

Users who are viewing this thread

Back
Top Bottom