If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Filter Form, Print Report based on Filter
I have a report where the user can filter the results on the form using
Access filter keys. I have a button on my form that prints the results of the filter. My problem is when the user returns to the form the next time, the report will show up blank. I'm not that good in coding but I was using this, based on a response on here. Private Sub cmd_Preview_Click Dim strWhere As String If Me. Dirty Then Me. Dirty = False 'save any edits If Me.FilterOn Then strWhere = Me.Filter DoCmd.OpenReport "My Report", acViewPreview, , strWhere End Sub I don't want the report to remember the filter after it is closed. Should I be using something else? |
Thread Tools | |
Display Modes | |
|
|