apply filter action cancelled

R

richaluft

I'm trying to use recordsgotonew command on an open order-entry type
of form/subform so that I can thus enter new record. There is a
filter applied to the form after update of one of the form controls.
After entry of data for first client, which proceeds without a
problem, I then click a 'next' cmdbtn which has the recordsgotonew
command entered, and the data on the form clears appropriately.
However, as I enter data for the subsequent client, when I get to time
for application of the filter, I get errmsg of "Run Time error 2501;
The Apply Filter action was cancelled".
Any explanation as to what might be going wrong to cause this problem?
Thanks in advance
RL
 
O

OssieMac

I have experienced a similar problem and I got around it by cancelling the
filter and reapply it later.
In conjunction with this code "I then click a 'next' cmdbtn which has the
recordsgotonew command entered"; try cancelling the filter. I assume you know
how but saves another positng if you don't.
DoCmd.RunCommand acCmdRemoveFilterSort 'turns filter off

DoCmd.RunCommand acCmdApplyFilterSort 'turns filter on
 
R

richaluft

I have experienced a similar problem and I got around it by cancelling the
filter and reapply it later.
In conjunction with this code "I then click a 'next' cmdbtn which has the
recordsgotonew command entered"; try cancelling the filter. I assume you know
how but saves another positng if you don't.
DoCmd.RunCommand acCmdRemoveFilterSort   'turns filter off

DoCmd.RunCommand acCmdApplyFilterSort  'turns filter on

--
Regards,

OssieMac





- Show quoted text -

Ossie;
I previously tried similar technique using 'FilterOn' property,
without any luck. I'll give your string a try and see if it functions
better.
RL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top