remove filter on another form

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

Guest

hello, I have a form that I use to filter the employee database. I can then
click 'delete user' and another modal form will popup asking for the
termination date. Once I enter the date I click 'OK' and it deletes the
record just fine, only I want to remove the filter from the first form. I've
tried every syntax I could think of and cannot get it to work.

I'm calling a cmd button that has the following code in it:

DoCmd.RunCommand acCmdRemoveFilterSort

when I call it; call form_frmdelemp.cmdClearSearch_Click
I get the error 'the command or action 'remove filter/sort' isn't available
now.
 
Using DoCmd, you will remove the filter from the acitve form, which is
probably your pop-up. To specify removing the filter from a particular form
try:

Forms!frmDelemp.FilterOn = False
or
Forms!frmDelemp.Filter = ""
 
Back
Top