Zippersabrat
Blah Blah Blah :o)
- Local time
- Today, 04:45
- Joined
- May 5, 2010
- Messages
- 31
Hello all! I have a filter on a subform based on a value from the main form. Code for this filter is:
I am trying to get the filter to clear on the subform with a button click. So all records are shown. However, the below code is not doing this. Any suggestions?
Thanks so much!
Code:
Private Sub Product_Type_AfterUpdate()
Me.Central_Structure_Product_List.Requery
Dim strType As String
Dim strFilter As String
If Not IsNull(Me.[Product Product Type]) Then
strType = "='" & Me.[Product Product Type] & "'"
Else
strType = "=" & Me.[Product Product Type] Like "" * """"
End If
strFilter = "[Product Type] " & strType & ""
With Me![Central Structure Product List].Form
.Filter = strFilter
.FilterOn = True
End With
End Sub
I am trying to get the filter to clear on the subform with a button click. So all records are shown. However, the below code is not doing this. Any suggestions?
Code:
Private Sub ClearBt_Click()
Me.Filter = ""
Me.FilterOn = True
End Sub
Thanks so much!