M
martinmike2
Hello,
I am recieveing a type mismatch error when I run this code:
Private Sub cmdEOUT_Click()
On Error GoTo Err_cmdEOUT_Click
Dim stDocName As String
Dim stLinkCriteria As String
If IsNull(CHECK_OUT_DATE Or TRANSFERED_TO Or Text566) = True Then
If IsNull(CHECK_OUT_DATE) = True Then
Me.CHECK_OUT_DATE.BackColor = 26367
End If
If IsNull(TRANSFERED_TO) = True Then
Me.TRANSFERED_TO.BackColor = 26367
End If
If IsNull(Text566) = True Then
Me.Text566.BackColor = 26367
End If
MsgBox "You must complete the highlighted fields to" & vbCrLf & _
"successfuly print a check-out sheet.", vbOKOnly +
vbInformation + vbExclamation, gstrAppTitle
Else
stDocName = "frmECHKOUT"
DoCmd.OpenForm stDocName
End If
Exit_cmdEOUT_Click:
Exit Sub
Err_cmdEOUT_Click:
MsgBox Err.Description
Resume Exit_cmdEOUT_Click
End Sub
the code works when all of the boxes are empty, but when one, two, or
all three of them are dirty then I get a type mismatch error.
I am recieveing a type mismatch error when I run this code:
Private Sub cmdEOUT_Click()
On Error GoTo Err_cmdEOUT_Click
Dim stDocName As String
Dim stLinkCriteria As String
If IsNull(CHECK_OUT_DATE Or TRANSFERED_TO Or Text566) = True Then
If IsNull(CHECK_OUT_DATE) = True Then
Me.CHECK_OUT_DATE.BackColor = 26367
End If
If IsNull(TRANSFERED_TO) = True Then
Me.TRANSFERED_TO.BackColor = 26367
End If
If IsNull(Text566) = True Then
Me.Text566.BackColor = 26367
End If
MsgBox "You must complete the highlighted fields to" & vbCrLf & _
"successfuly print a check-out sheet.", vbOKOnly +
vbInformation + vbExclamation, gstrAppTitle
Else
stDocName = "frmECHKOUT"
DoCmd.OpenForm stDocName
End If
Exit_cmdEOUT_Click:
Exit Sub
Err_cmdEOUT_Click:
MsgBox Err.Description
Resume Exit_cmdEOUT_Click
End Sub
the code works when all of the boxes are empty, but when one, two, or
all three of them are dirty then I get a type mismatch error.