Error 2486 AAAARGGGHHH!!

G

Guest

I have been using a piece of code for 2-3 years now, but all of a sudden it
has decided to break. I have tried the usual Compact and Repair but it
doesnt seem to fix the problem.

Basically, I am executing a series of SQL statements in VB (db.Execute).
One of the queries decided to start throwing out application errors and
crashing so I changed the code to DoCmd.OpenQuery

The trouble I am having now is when execution gets to the DoCmd statement, I
get the error 2486 - You cannot carry out this action at the present time.

This ends up locking the DB up and I have to go into Task Manager and End
Task to get rid of it!

Can anyone help me?

Cheers,
Steve.
 
D

David C. Holley

Did you make any recent inoculous(sp) changes to a table or query that
the troublesome query MIGHT use? Code doesn't just suddenly start to
crap out. Have you tried running the query as a query as opposed to via
code?
 
G

Guest

Thanks for the reply.

I have added a couple of fields but that was after the error started
appearing.

I have noticed with the table concerned that sometimes when trying to close
it. I will get the 'This action will reset the current code in break mode'.

Would rebuilding the DB fix the problems?

Cheers,
Steve.
 
D

David C. Holley

I wouldn't be too concerned about the specific error. The underlying
problem though IS something to be concerned about. Consistent with that,
I would have concerns over not being able to properly shut the DB
down. I would ensure that you're regularly backing up the DB *AND* come
up with a feasible temporary work-around.

How complex is the SQL Statement?
Have you thought about building a fresh query from scratch?
 
G

Guest

The query isnt that complex, it an Append query with 2 tables joined by 2
fields and basic criteria.

I will try rebuilding the query but there is no scope to simplify it.

Thanks,
Steve.
 

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