I have a form that when I open it from another form with:
Dim str1 As String
str1 = Me.cmbArea
DoCmd.OpenForm "DIForm", , , "[Area] ='" & str1 & "'"
Problem:
this works great but if I try opening it by itself it still has this same filter that was last used.
What I want:
I want the Form to open with no filter or a default filter if I just open the form.
Things I have tried:
1 - On Form_Close I tried
Me.Filter = "[MN12] <> """""
I set a break point and it sets the filter to this when I close the form but then when I open it back up it has the previous filter again.
2 - Setting the Filter property field to
[MN12] <> ""
This works if I set it manually in the property table save close form then reopen. Once I open the form from my other form with the filter it goes back to the same problem.
Any ideas would be appreciated, thanks.