Applying Filter to Form in a Looping Macro Causes Catastrophic Err

D

dbguru316

I have a form that contains order details and I run through a loop that
applies a filter to the form (only view one order at a time), and then
removes the filter, applies a different filter (next order) and then removes
it etc.

After about 300 times, I get a message stating "not enough memory..." This
is fairly consistent and have narrowed it down to being a MS Access issue (as
opposed to a hardware issue). I have reduced the number of times the looping
macro runs to 100, and finishes successfully (without the memory error), but
renders the keyboard useless for changing any MS Access objects, but the
keyboard is functioning if I switch to another applicaition like MS Excel.

When the memory error occurs the macro is halted, and the form is corrupt -
I can no longer access it or view it in design view. Repair and compact
function does not repair the form.

Any ideas on why this is happening?
 
J

Jeanette Cunningham

Hi,
if you are trying to view the orders to choose an order to edit, then choose
another order to edit, . . .
Another approach that won't involve filter loops is to use a combo to choose
an order to edit.
You could instead use a search form to choose the order you want to edit.
There is a great sample of a search form with all the code on
www.allenbrowne.com
Look for the sample search form.

Jeanette Cunningham
 

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