Validation question

L

Lauri

Access 2000.
I have a form similar to:
Student Date Status PrevStatus
1 8/19/05 P
2 8/19/05 I

Where the teacher enters this week's status. I want to restrict the
possibilities based on what is in the PrevStatus field. If the student had
an "I" last week, they can't have an "I" this week.

There are other restrictions, but if I get this one, I think I can get all
the rest in.

TIA
-Lauri
 
K

Klatuu

I think the best place to do this would be in the Before Update event of the
text box for entering the status. You may have to change the names I use in
the example to fit your form:

If Me.txtPrevStatus = "I" And Me.txtStatus = "I" Then
MsgBox "Previous Week's Status was I. It is not valid for this week"
Cancel = True
End If
 
Top