After changing record source of subform shows status filterd

masoud_sedighy

Registered User.
Local time
Today, 03:11
Joined
Dec 10, 2011
Messages
132
I have a main form and a subform. Now for filtering subform depending on a combo box on the main form,I have put 2 buttons one for search and another one for clear search,
When i click search button it changes record source of subform and it works.
When I click clear button it changes record source for showing all the records.
Now I would like subform shows status “filtered” when I change record source of subform after clicking search button.
Also it shows status “unfiltered” when I change record source for showing all the records after clicking clear button.

<code>

Public Sub cmdSearch_Click()
Me!fSubformLineDoc.Form.RecordSource = strSQL & " WHERE " & varWhere & strOrder
Me!fSubformLineDoc.Form.Requery

End Sub


</code>
 
You are not filtering when you change record source.
 
thanks, if i wanted to do the same job with filtering subform (not changing record source of subform) how i have to do that?

also for unfiltering the subform.
 

Users who are viewing this thread

Back
Top Bottom