Hi there, I have a form with two Subform controls on, one of them links to my orders form, the other to my products form(displayed as a datasheet), I apply the filter using VBA, if the form is set to continuous instead of datasheet, the filter works fine, otherwise it has no affect, here's my code,
Form_Orders.InVisOrderID.Value is the PK on my orders form,
Form_Orders.InVisOrderID.Value is the PK on my orders form,
Code:
Private Sub Form_Current()
Form_Products.Filter = "[OrderID] = " & Form_Orders.InVisOrderID.Value
Form_Products.Requery
Form_Products.FilterOn = True
Form_Products.Requery
End Sub