Hi guys,
I have a load of reports which I currently filter down by date by using the following on the macro to run the report. It runs absolutely perfectly.
Now I want to adjust it a little. so as well as searching by date I can filter by user. I have a field in the table/report called "user" and I have a list box in the page with the macro with all the users who can be selected listbox is called "users" so how can I get the report to filter by date and the user in the list box?
Thanks once again.
I have a load of reports which I currently filter down by date by using the following on the macro to run the report. It runs absolutely perfectly.
Code:
DoCmd.OpenReport ReportName:="Tenancy Agreed", View:=acViewPreview, _
WhereCondition:="[Date Created] Between #" & Format(Me.txtFrom, "mm\/dd\/yyyy") & _
"# And #" & Format(Me.txtTo, "mm\/dd\/yyyy") & "#"
Now I want to adjust it a little. so as well as searching by date I can filter by user. I have a field in the table/report called "user" and I have a list box in the page with the macro with all the users who can be selected listbox is called "users" so how can I get the report to filter by date and the user in the list box?
Thanks once again.