Error 3011...sometimes

BigJimSlade

Registered User.
Local time
Today, 17:02
Joined
Oct 11, 2000
Messages
173
Hi, Big Jim here:

I am receiving the 3011 error (could not find table error) when I attempt to run this code:

Docmd.Rename [New Table Name], acTable, [Old Table Name]

However, in break mode, if I step through it, it works. Why would this not work in regular run-time, but it will work in break mode when I step through it?

Any thoughts?
Thanks in advance!

Big Jim
 
Last edited:
this might be too obvious, but make sure your using double quotes around the old/new names...

DoCmd.Rename "NewTableName", acTable, "OldTableName"

your syntax looks fine to me though... possibly is this a permission/networked database? Either of those elements may prevent the table from being modified...
 
jat!

Big Jim and his colleagues figured it out. It seems that the database had an AutoExec Macro on startup (I have never heard of those before, but it seems to be a Macro that is set to run automatically on startup). This autoexec macro somehow prohibited some of the other code from working. When we removed the Macro, everything was fine.

Thanks for your help!

Big Jim
 

Users who are viewing this thread

Back
Top Bottom