Please help with this if statement

wiremonkey22

Registered User.
Local time
Today, 03:25
Joined
Jan 13, 2008
Messages
68
I'm new at this so any help would be great what im trying to do is:

I have a form where i want to update records to a table on this form i have a text box labeled fldclearance for the type of security clearances a person has this text box is controlled by a lookup table called clearancetbl in this table i have Unverified ok back to the form i have a check box that is called fldescort
which if checked means this person must be escorted what i want is for this box not to be able to be unchecked when the clearance box says unverified this is what i have

Private Sub fldescort_BeforeUpdate(Cancel As Integer)
Dim escort As String
If Me.fldclearence = "Unverified" Then
MsgBox "Without verified clearence this person must be escorted", vbOKOnly, "Note"
Cancel = True
Me.SetFocus
End If
End Sub

Ive tried this with if isnull(me.fldclearence) and it works if there is nothing in the field but i want the field to say Unverified please tell me what im doing wrong thanks in advance:confused:
 
want I want is for this box not to be able to be unchecked when the clearance box says unverified
Monkey,

For this problem, maybe try this on an event (I would think "OnCurrent" would work here):
Code:
if me.ClearanceTxtBox = "Unverified" then
   me.CheckBoxName.Enabled = false
 

Users who are viewing this thread

Back
Top Bottom