Start & End Date, both filtering the field "dteAuditDate".
These would be Filter8 & Filter9.
I've tried adding to the following code but I'm doing something wrong because the date filter overrides the other 7 criteria every time I click Run Report or it doesn't work at all.
Can someone help me update my code to add two fields to get a Date Range as well as any of the 1-7 of the selections made?
Code below is for Filters 1-7 only. I would like to add 8 & 9 as Start & End Date for the "dteAuditDate" field.
Expand|Select|Wrap|Line Numbers
- Private Sub Set_Filter_Click()
- Dim strSQL As String, intCounter As Integer
- For intCounter = 1 To 7
- If Me("Filter" & intCounter) <> "" Then
- strSQL = strSQL & "[" & Me("Filter" & intCounter).Tag & "] " & " = " & Chr(34) & Me("Filter" & intCounter) & Chr(34) & " And "
- End If
- Next
- If strSQL <> "" Then
- ' Strip Last " And ".
- strSQL = Left(strSQL, (Len(strSQL) - 5))
- Reports![rptData].Filter = strSQL
- Reports![rptData].FilterOn = True
- End If
- End Sub
LB in GA