G
Guest
I am trying to write a global code that detects any missing value that I
specify in the argument. I am getting error messages with the following code:
Call MissingVal(Parent.[DateofExam], "Date of Exam", Me)
Function MissingVal(Val, fldName As String, frm As Form) As Integer
If Not IsNull(Val) Then
MissingVal = 1
Else
MissingVal = 0
MsgBox "You must enter " & fldName
frm.Undo
frm.fldName.SetFocus
End If
End Function
specify in the argument. I am getting error messages with the following code:
Call MissingVal(Parent.[DateofExam], "Date of Exam", Me)
Function MissingVal(Val, fldName As String, frm As Form) As Integer
If Not IsNull(Val) Then
MissingVal = 1
Else
MissingVal = 0
MsgBox "You must enter " & fldName
frm.Undo
frm.fldName.SetFocus
End If
End Function