I have a report where its code sheet is coded as follows:
Option Compare Database
Option Explicit
Dim Indate As Date
Const Prompt As String = "Enter date after which funds have been received" & vbNewLine & _
"and which are now subject to deposit."
Private Sub Report_Open(Cancel As Integer)
Me.lblHeader.Caption = "Registrar's Bank Deposits for " & gblRetreatYear
Indate = InputBox(Prompt, "Deposit Summary Report")
Me.lblDepositDate.Caption = "(For funds received after " & Indate & " )"
Me.Filter = "RetYear = " & """" & gblRetreatYear & """" & " AND RecDate > " & Indate
Debug.Print Me.Filter
Me.FilterOn = True
End Sub
In the immediate window, the value for Me.Filter is: RetYear = "2013" AND RecDate > 03/19/2013
"RetYear" is text and "RecDate" is date, as included in the RecordSource query for the report. gblRetreatYear is global and is Dim'd as text.
The report IS NOT being filtered to exclude "RecDates" prior to "03/19/2013", as entered via InputBox.
What am I missing here?
Thanks,
Bill