Hi
I've been stuck on this issue for weeks... I've tried scheme after scheme, idea after idea....
Why, why, why, why do deleted Filters/OrderBys re-appear when I've deleted them using VB in Acc2007
In a mainform/subform setup I want to delete all user applied filters and orderbys on exit (using custom Exit button).
I manually cleared all the Filters and OrderBys in Design View
I used me.form.filter="" and me.subform_name.form.filter ="" and/or
me.form.filter=vbNullString and me.subform_name.form.filter =vbNullString
I used acSaveNo and acSaveYes variously in the Exit
I've tried the Runcommands to RemoveAllSorts, RemoveAllFilters
I now even edit the forms on exit with:-
And STILL the subform filters and orderbys persist!!
Why do the Access fairies keep putting them back and which magical chant do I use to stop them please??
Thanks
I've been stuck on this issue for weeks... I've tried scheme after scheme, idea after idea....
Why, why, why, why do deleted Filters/OrderBys re-appear when I've deleted them using VB in Acc2007
In a mainform/subform setup I want to delete all user applied filters and orderbys on exit (using custom Exit button).
I manually cleared all the Filters and OrderBys in Design View
I used me.form.filter="" and me.subform_name.form.filter ="" and/or
me.form.filter=vbNullString and me.subform_name.form.filter =vbNullString
I used acSaveNo and acSaveYes variously in the Exit
I've tried the Runcommands to RemoveAllSorts, RemoveAllFilters
I now even edit the forms on exit with:-
Code:
DoCmd.Close acForm, Me.Name
DoCmd.OpenForm "Addrs_Dtls_Form", acDesign, , , , acHidden
Forms![Addrs_Dtls_Form].Filter = ""
Forms![Addrs_Dtls_Form].OrderBy = ""
Forms![Addrs_Dtls_Form].FilterOn = False
Forms![Addrs_Dtls_Form].OrderByOn = False
DoCmd.Close acForm, "Addrs_Dtls_Form", acSaveYes
DoCmd.OpenForm "Addrs_Dtls_SubForm", acDesign, , , , acHidden
Forms![Addrs_Dtls_SubForm].Filter = ""
Forms![Addrs_Dtls_SubForm].OrderBy = ""
Forms![Addrs_Dtls_SubForm].FilterOn = False
Forms![Addrs_Dtls_SubForm].OrderByOn = False
DoCmd.Close acForm, "Addrs_Dtls_SubForm", acSaveYes
DoCmd.SetWarnings True
Why do the Access fairies keep putting them back and which magical chant do I use to stop them please??
Thanks