syntnx
asked on
Clearing a Filter by Form
Hello everyone, Heres my question!
I am using "DoCmd.RunCommand acCmdFilterByForm" to open a form in "Filter by Form" mode. This allows the user to create a custom filter to their liking. Once run, the user can then us a button I have created to push the "filtered" results to a generic report I have created. The problem I am having is more of an anoyance than anything. After filtering the records accroding to their needs. Another use may try to use this feature and find the criteria the last user entered on the "Filter by Form" screen. He/she can delete this criteria and eneter their own, but if they miss something it will fudge the reulting data.
I would like the "Filter by Form" to be cleared (no values in any field) when the user selects the button containing "DoCmd.RunCommand acCmdFilterByForm" . Can this be done and if so, anyone have any ideas?
ty
syntnx
I am using "DoCmd.RunCommand acCmdFilterByForm" to open a form in "Filter by Form" mode. This allows the user to create a custom filter to their liking. Once run, the user can then us a button I have created to push the "filtered" results to a generic report I have created. The problem I am having is more of an anoyance than anything. After filtering the records accroding to their needs. Another use may try to use this feature and find the criteria the last user entered on the "Filter by Form" screen. He/she can delete this criteria and eneter their own, but if they miss something it will fudge the reulting data.
I would like the "Filter by Form" to be cleared (no values in any field) when the user selects the button containing "DoCmd.RunCommand acCmdFilterByForm" . Can this be done and if so, anyone have any ideas?
ty
syntnx
ASKER
Didnt seem to work. Im not real familar with VB, is the following systax correct?
DoCmd.OpenForm "frmAgreementsFilter",acNo rmal, "", "",
acEdit, acNormal
Me.Filter = vbNullString
DoCmd.RunCommand acCmdFilterByForm
syntnx
DoCmd.OpenForm "frmAgreementsFilter",acNo
acEdit, acNormal
Me.Filter = vbNullString
DoCmd.RunCommand acCmdFilterByForm
syntnx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
You've done it again! Wowbagger_TIP I have posted some points for you too at https://www.experts-exchange.com/questions/20563840/points-for-Wowbagger-TIP.html
Thanks
syntnx
Thanks
syntnx
Me.Filter = vbNullString