Place a control on your form that contains your DoCmd.OpenReport method and
try something like:
Dim strWhere as String
strWhere = "1 = 1 "
If Not IsNull(Me.txtStartDate) Then
strWhere = strWhere & " And [DateField]>=#" & Me.txtStartDate & "#"
End If
DoCmd.OpenReport "rptYourReport", acPreview, , strWhere
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.