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

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.