I am using the code below to filter a report:
Private Sub Set_Filter_Click()
If Me![BeginDate] And Me![EndDate] <> "" Then
If Application.CurrentProject.AllReports("rptDailyOut put").IsLoaded
Then
DoCmd.Close acReport, "rptDailyOutput"
DoCmd.OpenReport "rptDailyOutput", acViewPreview, , "[MyDate]
Between #" & Format(Me![BeginDate], "mm/dd/yy") & "# and #" &
Format(Me![EndDate], "mm/dd/yy") & "#"
Else
DoCmd.OpenReport "rptDailyOutput", acViewPreview, , "[MyDate]
Between #" & Format(Me![BeginDate], "mm/dd/yy") & "# and #" &
Format(Me![EndDate], "mm/dd/yy") & "#"
End If
Else
MsgBox "You must enter a Start Date & End Date", vbOKOnly
End If
End Sub
I have added a new combo-box on the filter form called [DC]
This combo box row source type is "value list" and the source is:
"ALL";"VDC";"QDC"
How can I include [DC] in the code above? (where it is a required
selection)
I have tried with no success.