Filter a Form based on a field in another form

Pauline123

Registered User.
Local time
Today, 20:35
Joined
Apr 1, 2013
Messages
69
Hi, hope someone can help - I have a form (Suppliers) with a button that opens another form (Product List).

At the moment the form (Product List) is set as a pop-up form and when opened lists all products.

I want to filter the pop-up form to only display products for the current supplier displayed in the Supplier Form.

I have tried the following below without success - I have varied this but the filter does not apply - can anyone give me any pointers please.

Private Sub Form_Load()
DoCmd.OpenForm "Product List", acNormal, , "SupplierID = " & SupplierID
End Sub

Many thanks - Pauline
 
You've to put the code behind the button's click event!
 
Does your product list have a field SupplierID?

What is the record source of form suppliers?

What is the record source of form product list?
 
Hi thank you both for replying - this is what I get for not being totally awake and working on Access - put the code behind the buttons click event and it now works beautifully thank you both for your help.
Pauline
 

Users who are viewing this thread

Back
Top Bottom