This is yet another post that is related to my others. In my claim form, when a user goes to a new record and then hits the close button - at first they were being hit with a message about something being required. I fixed that but it occurred to me that if they type just one or two things and then want out that I better prepare for that. The first field has an input mask of LL set on it for two required letters. So, now if I enter one letter and then hit the close button I get the dreaded input mask error. I tried taking the input mask off in properties and putting in my close button code
If Me.Dirty And IsNull(Me!CLAIM_TYPE_CODE) Then
MsgBox "You can not leave CLAIM TYPE CODE blank. It is a required field. Please enter the correct CLAIM TYPE CODE.", , "Service of Process Error"
Me!CLAIM_TYPE_CODE.SetFocus
ElseIf CLAIM_TYPE_CODE.InputMask <> "LL" Then
MsgBox "The Claim Type Code Field Requires Two Letters Be Entered, such as WC. Please do so now.", , "Service of Process Error Message"
CLAIM_TYPE_CODE.SetFocus
Else
DoCmd.Close
End If
However, now even if I type two letters I still get the message. Help!
If Me.Dirty And IsNull(Me!CLAIM_TYPE_CODE) Then
MsgBox "You can not leave CLAIM TYPE CODE blank. It is a required field. Please enter the correct CLAIM TYPE CODE.", , "Service of Process Error"
Me!CLAIM_TYPE_CODE.SetFocus
ElseIf CLAIM_TYPE_CODE.InputMask <> "LL" Then
MsgBox "The Claim Type Code Field Requires Two Letters Be Entered, such as WC. Please do so now.", , "Service of Process Error Message"
CLAIM_TYPE_CODE.SetFocus
Else
DoCmd.Close
End If
However, now even if I type two letters I still get the message. Help!