Filter a datasheet

jamesWP

Registered User.
Local time
Today, 15:33
Joined
Aug 8, 2005
Messages
68
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,

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
 

Users who are viewing this thread

Back
Top Bottom