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>
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>