I created a form to allow users to create a report based on a date range. I did so using this code:
Private Sub cmdOk_Click()
If IsNull(Me.txtStartDate) Or IsNull(Me.txtEndDate) Then
MsgBox "Both dates are required for this search!", vbInformation
Else: DoCmd.OpenReport...