I just created the following:
Private Sub ContractControlNum_AfterUpdate()
Dim L2result As String
L2result = Left(Me![ContractControlNum], 2)
If L2result <> "AB" Then
'or L2result <> "TR" Then
MsgBox "You must enter either the letters TR or AB in front of the Number."
End If
End Sub
This works for AB but when I uncomment for TR to also be a choice for the entry I get error 13 type mismatch?
Any way to fix this ?
Private Sub ContractControlNum_AfterUpdate()
Dim L2result As String
L2result = Left(Me![ContractControlNum], 2)
If L2result <> "AB" Then
'or L2result <> "TR" Then
MsgBox "You must enter either the letters TR or AB in front of the Number."
End If
End Sub
This works for AB but when I uncomment for TR to also be a choice for the entry I get error 13 type mismatch?
Any way to fix this ?