How to cleaning filter form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi people, I have a problem with the filters forms.
I have a form that it do the insert of a table and also a select and update.

When i select a field, i use other form and this open the problematic form
with this order:

DoCmd.OpenForm stDocName, , , stLinkCriteria

It works well. But once made the consultation, i open the form to add fields
(with DoCmd.OpenForm rs![Argument], acNormal, "", "", acAdd) the filter,
when i look the form in desing, this there!!!!!!

I'm becoming crazy... I have proven erase the filter when the form unload,
when the consultation form unload, load, when the application start... But
nothing,nothing clean it.

Exists the indestructible filter? I think that yes...

Please, Can anyone help me to find the crypthonyta for this filter?...

to pardon my English…
 
What sometimes works is to explicitly remove the filter, then save the form
in VBA:

Private Sub Form_Unload(Cancel As Integer)
Me.Filter = ""
Me.OrderBy = ""
DoCmd.RunCommand acCmdSave
End Sub

This problem has existed since it was introduced in Access 97. The only way
that I've found to be sure that it can't happen is to deny design
permissions to the users. That only comes with user level security.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
Hi Arvin, thanks for you reply.

I have proven your code, but my filter is indestructible.

When i look the form in desing, the filter property has the value of the
"where condition" that I pass in the query form.

It would be better create a form for to consult and other to insert data?
 
Other than securing the database, that seems to be the easiest way. Make
sure that filtering is disabled in the data entry form.

The database that I created that had this problem had all menu filtering
disabled, I removed the title bar and close button from the form and
replaced it with my own, which ran the code I posted earlier.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top