Chat with a LIVE Microsoft Access Expert!
 
       
 

         

   

Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
 
Chat with a LIVE Microsoft Access Expert!
Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-19-2002, 06:10 AM
BigJimSlade BigJimSlade is offline
Registered User
 
Join Date: Oct 2000
Location: Tampa
Posts: 171
BigJimSlade
Send a message via ICQ to BigJimSlade
Error 3011...sometimes

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 by BigJimSlade; 06-19-2002 at 06:23 AM..
Reply With Quote
Sponsored Links
  #2  
Old 06-19-2002, 06:45 AM
jatfill's Avatar
jatfill jatfill is offline
Senior Member
 
Join Date: Jun 2001
Location: Lexington, KY
Posts: 150
jatfill
Send a message via ICQ to jatfill
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...
Reply With Quote
  #3  
Old 06-19-2002, 07:24 AM
BigJimSlade BigJimSlade is offline
Registered User
 
Join Date: Oct 2000
Location: Tampa
Posts: 171
BigJimSlade
Send a message via ICQ to BigJimSlade
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
Reply With Quote
Sponsored Links
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 04:48 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
(c) copyright 2009 Access World