Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Runtime Error: 2486

Status
Not open for further replies.

anorakgirl

Programmer
Jun 5, 2001
103
GB
I have just upgraded all our office databases from Access
97 to Access 2000 SR1. I tested them and they seemed to
work fine, but now they are being used more intensively,
users are encountering intermittent Runtime Error: 2486s,
which I am having trouble tracking down.

The databases use ODBC to connect to a PostgreSQL backend
database. Apart from that they are fairly standard
databases. So far, I can't tell what is causing the
problem, it seems erratic, but, once the problem has
occured, the user is unable to run any bit of code which
uses the DoCmd object, e.g. DoCmd.OpenForm,
DoCmd.GoToRecord etc, until they close and reopen the
database. It seems that something happens, some bit of
code somewhere runs, and access doesn't think it has
finished and then won't do DoCmds. However, this doesn't
appear to happen after the user has carried out any
particular action, so I can't identify a particular
problem bit of code.

So far from looking this up on the internet, I have been
through the database and made sure all recordsets were
closed and set to null (they weren't originally) but this
hasn't helped. I'd be grateful for any suggestions as to
what areas of code might cause this problem. Or is this a
bug?

Thanks very much!
~ ~
 
I've heard of this problem before, and no seems to have any idea what causes it. Whatever it is, Access has somehow gotten busy doing something other than what you want it to be doing. I have fixed a couple of problems of this general type (You Cannot Carry Out This Action At The Present Time - no documentation, head scratch from MS error), and here is what I've done:

If it won't trap out to the debugger, I walk the code line by line, trying to debug it out to the statement that causes the error. This might take you an afternoon, but you gotta do it if the error is not being trapped where you can get at it, such as a function with no error handler returning to a calling function with an error handler.

Next I determine what the object the statement is referencing, and try to follow the object up through it heirachy to identify any object it is in turn a member of. I then insert lines of code before this statement to explicitly close these objects, and then do a Set object = Nothing on each one as well, followed by the statements necessary to reopen it. This has worked more often than not, but keep in mind that this is major surgery and it could either kill or cure the patient.

I think these errors are caused by infinte loop errors in the supporting objects. Reinitializing the object seems to fix it for some reason.

Couple of other things to check:

Are your ODBC drivers up to date?
Are you compacting the databases? Bloated mdb's will do all kinds of strange stuff.
You might try unlinking the Psql tables and relinking them.
Don't ask me why, but it has fixed problems I've had with databases that were converted from 97.
Also, is the code clean as far as releasing objects and closing things ?
Also, make yourself a test copy and make sure every function and sub in it has an error handler to takes you to a stop statement.


Hope this helps


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top