If the field is empty then the user can add a date, if the field already has a date then the user cannot.
Should I lock the field on open or use the dirty event which doesn't work as the code below because when a new date is entered the dirty event fires anyway?:
Code: Select all
Private Sub BookOutDate_BeforeUpdate(Cancel As Integer)
If Me.Dirty = True Then
If Me.BookOutDate > 0 Then
MsgBox "You Have Already Set The Book Out Date" & vbCrLf & _
"You Will Need To Change The Dates Through The Delay Portal", , "Dates"
Cancel = True
DoCmd.Close acForm, Me.Name
Exit Sub
End If
End If
End Sub