Hi everyone,
I allow users to filter data in a form.
When I open the form in Design View mode the FILTER property stores the last used filter string.
I used the following code on FORM_CLOSE event
However, when I open the form in Design View mode the FILTER property still stores the last used filter string.
Does anybody know how to force MS Access not to store the last used filter string or how to clear FILTER property when closing the form?
I know that I can use FORM OPEN event to clear it:
however, my question is how to prevent storing it, so FILTER property is BLANK when I open the form in Design View?
Thanks.
surotkin
I allow users to filter data in a form.
When I open the form in Design View mode the FILTER property stores the last used filter string.
I used the following code on FORM_CLOSE event
Code:
Private Sub Form_Close()
Me.Filter = ""
Me.FilterOn = False
DoCmd.Save acForm, Me.Name
End Sub
However, when I open the form in Design View mode the FILTER property still stores the last used filter string.
Does anybody know how to force MS Access not to store the last used filter string or how to clear FILTER property when closing the form?
I know that I can use FORM OPEN event to clear it:
Code:
Private Sub Form_Open(Cancel As Integer)
Me.Filter = ""
Me.FilterOn = False
End Sub
however, my question is how to prevent storing it, so FILTER property is BLANK when I open the form in Design View?
Thanks.
surotkin