Full Version: Filter Value problem
UtterAccess Forums > Microsoft® Access > Access Forms
access2009eg
Dear all
I have form and sub form (Master form and subform on it)
I have 2 problem with the subform the 2 problem is:
1
The subform save previous filter value :
I mean:
Example:
Filter : ((QrySearch.NameOfClient Like "*ABC"))
2
The subform save previous order by value :
I mean:
Example:
Orderr />I have form and sub form (Master form and subform on it)
I have 2 problem with the subform the 2 problem is:
1
The subform save previous filter value :
I mean:
Example:
Filter : ((QrySearch.NameOfClient Like "*ABC"))
2
The subform save previous order by value :
I mean:
Example:
ORDER by : QrySearch.A_NO
That I want :
I want code to remove this value in filter or order by because I face many problem when this value still there
====
I do this to solve the problem
Private Sub Command257_Click()
DoCmd.OpenForm "Frmsubsearch", acDesign
Forms!Frmsubsearch.Filter = ""
End Sub
This code close the subform and master form and this not require
===
I do this also but not work
Me.childsubsearch.Form.Filter = ""
strive4peace
why not just reset the filter each time the form is opened? Use the OPEN event before data is LOADed

anyway, if you are going to use code as you have, you would need to save the form when you close it

~~~~~~~~~
Me.childsubsearch.Form.Filter = ""
nstead, you can do this:
Me.childsubsearch.Form.FilterOn = false
Me.requery
after you change the filter, you need to requery the form/subform if you want to leave it open
access2009eg
Thank you for your help and answer
Ochange the form record source to SQL Code
and work correctly
strive4peace
glad you got it wink.gif
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.