Filter in Form - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Filter in Form

aralaral Posts: 25Member

i have a form in tabular view enumerating the products contained in different orders. like that


Productid ProductName Order OrdeeDate

1 Apples 1345
2 Pears 1345
1 Apples 1890
1 Apples 1880

I want to filter the form and by clicking over any row that contains apples to obtain all the apples like that

1 Apples 1345
1 Apples 1890
1 Apples 1880

I have tried the following . I have named the tex t box containing the ProductID as TxtProductID.
In the OnClick event i have:


Me.FilterOn = True
Dim strFilter As String
strFilter = "[ProductID] = " & Me![TxtProductID]
Me.Filter = strFilter

The result i get is wrong.It shows only the first productid. So if i click on Pears i receive again filtered Apples.

Can somebody help me ?



Comments

  • aznwildkataznwildkat Posts: 139Member

    : I want to filter the form and by clicking over any row that contains apples to obtain all the apples like that

    Have you already thought of using the defined, "FilterByForm"?

    Is your data in a table-like format where you want to double click on a row to do the records with same [Productid].

Sign In or Register to comment.