The on click event, for a Report, has the following:
Sub DateEntry()
Dim Start_Date As Date
Dim End_Date As Date
Start_Date = InputBox("Enter Start Date mm/dd/yyyy")
End_Date = InputBox("Enter End Date mm/dd/yyyy")
End Sub
This works fine and allows for Input. I added the sub below, but it does not work and the report opens:
Sub CheckEntry()
If Start_Date Is Null Then
MsgBox "No Date was Entered"
DoCmd.Close acReport, "Summary Action Report"
Exit Sub
End If
If End_Date Is Null Then
MsgBox "No Date was Entered"
DoCmd.Close acReport, "Summary Action Report"
End If
End Sub
Sub DateEntry()
Dim Start_Date As Date
Dim End_Date As Date
Start_Date = InputBox("Enter Start Date mm/dd/yyyy")
End_Date = InputBox("Enter End Date mm/dd/yyyy")
End Sub
This works fine and allows for Input. I added the sub below, but it does not work and the report opens:
Sub CheckEntry()
If Start_Date Is Null Then
MsgBox "No Date was Entered"
DoCmd.Close acReport, "Summary Action Report"
Exit Sub
End If
If End_Date Is Null Then
MsgBox "No Date was Entered"
DoCmd.Close acReport, "Summary Action Report"
End If
End Sub