automaticbaby
Technical User
Is there a way to have multiple filters on one report? I have a report that I would like to filter by date and by User ID. I can only get it to work with the date, but not the User ID.
I'm using the following code for the date:
DoCmd.OpenReport "Transaction Report", acPreview, , "[Date] between #" & Format(Me.StartDate, "mm\/dd\/yyyy" & "# And #" & Format(Me.EndDate, "mm\/dd\/yyyy" & "#"
When I use the following code for the User ID and rem out the above code, the program asks me to enter Me.User_ID:
DoCmd.OpenReport "Transaction Report", acPreview, , "[User ID] = Me.User_ID"
When I try try to use Me.Filter it doesn't work either. I created the following code:
Me.Filter = "User ID = User_ID"
Me.FilterOn = True
I've also added Me.Filter = "User ID = User_ID" to the filter of the report, but it doesn't work.
Anyone know if I can make this work?
Thanks.
I'm using the following code for the date:
DoCmd.OpenReport "Transaction Report", acPreview, , "[Date] between #" & Format(Me.StartDate, "mm\/dd\/yyyy" & "# And #" & Format(Me.EndDate, "mm\/dd\/yyyy" & "#"
When I use the following code for the User ID and rem out the above code, the program asks me to enter Me.User_ID:
DoCmd.OpenReport "Transaction Report", acPreview, , "[User ID] = Me.User_ID"
When I try try to use Me.Filter it doesn't work either. I created the following code:
Me.Filter = "User ID = User_ID"
Me.FilterOn = True
I've also added Me.Filter = "User ID = User_ID" to the filter of the report, but it doesn't work.
Anyone know if I can make this work?
Thanks.