Error 2486 on all Docmd

uncle-lai

Registered User.
Local time
Today, 13:34
Joined
Aug 8, 2003
Messages
98
Here is a strange problem I had never encountered before.

I have a form with a few command buttons. One button runs a Docmd.RunSQL code which append some records to a table. Another button runs a Docmd.RunSQL code that delete some records from the same table. The table is a simple table with only 5 fields.

The problem is after I opened the form I can only use one of the above buttons ONCE, after that I got this error message on all codes that began with Docmd.:

Run-time error '2486':
You can't carry out this action at the present time.

AND

I could not close the form. I could only close the databse file but could not exit MsAccess. I had to use Task Manager to end MsAccess process.

I had searched several forums but could not find any clue. Hope that I don't have to do the form from scratch again. Thanks for any help.

Peter :confused:
 
After 2 days' struggle I found some clue.

My form "frm_Order" has a sub-form which lists the details of the current Order. I had this line after the Docmd.RunSQL codes:

Code:
Me.refresh

After I changed it to:

Code:
Me.OrderDetails.Form.Requery

error #2486 message doesn't come up again. But still wonder why that could lead the whole app to a dead end.

Peter
 

Users who are viewing this thread

Back
Top Bottom