E
Ernst Guckel
hello,
I have a report that I want to filter by SOSID. here is some code...
txtMealDate holds a date and if I put
[SOSID] = 1 in the filter field of the report it filters fine but if I open
the report with this code it shows all data (not filtered) but strFilter
contains the right values?? Any ideas??
Public Const STRING_DATE As String = "\#mm/dd/yyyy\#"
stDocName = "rptMeals"
strFilter = "[SOSID] = " & DLookup("[SOSID]", "tblSOS", "[SOSDate] = " &
Format(Me.txtMealDate, STRING_DATE))
DoCmd.OpenReport stDocName, acViewPreview, strFilter
Thanks,
Ernst.
I have a report that I want to filter by SOSID. here is some code...
txtMealDate holds a date and if I put
[SOSID] = 1 in the filter field of the report it filters fine but if I open
the report with this code it shows all data (not filtered) but strFilter
contains the right values?? Any ideas??
Public Const STRING_DATE As String = "\#mm/dd/yyyy\#"
stDocName = "rptMeals"
strFilter = "[SOSID] = " & DLookup("[SOSID]", "tblSOS", "[SOSDate] = " &
Format(Me.txtMealDate, STRING_DATE))
DoCmd.OpenReport stDocName, acViewPreview, strFilter
Thanks,
Ernst.