I am using the below code to filter a subform based on the main form field of [Product Product Type]. The subform will filter based on the field [Product Type]. If I manually change the dropdown on the main form it will filter the subform. I do not want the user to have to do this as they will end up making a mess. I want that field to auto-update as they go through the data and then filter the subform based on the given value. In the past, I had this filter working but now I cannot seem to get it to function correctly. Can anyone tell me what I am doing wrong?
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].Value) Then strType = "='" & Me.[Product Product Type].Value & "'" 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