Why would the following code say data type mismatch in criteria expression?
Private Sub StudentID_AfterUpdate()
On Error GoTo Err_Handler
If Not IsNull(DLookup("[StudentID]", "tblStudent", "[StudentID]= " & Me!StudentID)) Then
MsgBox "Student Record already exists. Please go to Edit Student Info", vbOKOnly
End If
Err_Handler:
MsgBox Err.Description
End Sub
Private Sub StudentID_AfterUpdate()
On Error GoTo Err_Handler
If Not IsNull(DLookup("[StudentID]", "tblStudent", "[StudentID]= " & Me!StudentID)) Then
MsgBox "Student Record already exists. Please go to Edit Student Info", vbOKOnly
End If
Err_Handler:
MsgBox Err.Description
End Sub