I have a ADD New Record form that I created. The data enters correctly (I see the data in the table - all required fields are there but when I go and click on my Close Button that I created it doesn't work. The other buttons do work but his one will not close the form down. Any idea what would cause this? The only thing I was fooling around with prior to this was my Reference List.
Button code below:
Private Sub CloseME_Click()
If IsNull(Me.VisitDate) Then ''MOVED THIS OVER Or IsNull(Me.TypeOfVisit)
Dim Response As String
Response = MsgBox("MISSING DATA: VISIT DATE. Records without this information are deleted. Do you want to save this visit?", vbYesNo + vbCritical, "Save Visit")
If Response = vbYes Then MsgBox "Please enter in the VISIT DATE." ' User chose Yes.
If Response = vbNo Then
McrDeleteNullVisit
DoCmd.Close
Else
DoCmd.Close
End If
End If
End Sub
Button code below:
Private Sub CloseME_Click()
If IsNull(Me.VisitDate) Then ''MOVED THIS OVER Or IsNull(Me.TypeOfVisit)
Dim Response As String
Response = MsgBox("MISSING DATA: VISIT DATE. Records without this information are deleted. Do you want to save this visit?", vbYesNo + vbCritical, "Save Visit")
If Response = vbYes Then MsgBox "Please enter in the VISIT DATE." ' User chose Yes.
If Response = vbNo Then
McrDeleteNullVisit
DoCmd.Close
Else
DoCmd.Close
End If
End If
End Sub