By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,600 Members | 1,108 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,600 IT Pros & Developers. It's quick & easy.

Auto Exec macro hangs after compact/repair

P: 19
I noticed that after running compact/repair, I have to recompile my code for the program not to break the next time I open it. What happens is the auto exec macro runs the main() module, then hangs with the second line of code highlighted. No error message, just hangs. If I stop it and recompile the code, it runs again. Does anyone know anything about this? Is there some way to run something to recompile the code automatically after compacting so it doesn't get a hang the next time? Following is the code that runs after the autoexec macro (which simply calls the code):

Public Function Main()

Call SetStartupProperties
DoCmd.OpenForm "frmSplash", acNormal, , , , acWindowNormal
DoCmd.OpenForm "frmLoginMain", acNormal, , , , acDialog

End Function
Mar 19 '08 #1
Share this Question
Share on Google+
3 Replies


Expert 100+
P: 374
By change to do you have something defined in the Startup options in the database under Tools -> Startup?

If so, that needs to be changed to a blank.

The reason that may be doing that is if you're trying to open the form more than once, or two forms or two operations going on at the same time...

If that doesn't solve it, let me know.

Joe P.
Mar 20 '08 #2

P: 19
By change to do you have something defined in the Startup options in the database under Tools -> Startup?

If so, that needs to be changed to a blank.

The reason that may be doing that is if you're trying to open the form more than once, or two forms or two operations going on at the same time...

If that doesn't solve it, let me know.

Joe P.
Thanks for the quick response. I didn't even look under the startup properties as I'm setting up the db properties for the session using code rather than manually. I've used this same code numerous times with other databases and never had a problem, but this is the first time I've used version 2003, so I wonder if it has to do with that? I'm too tired to look this up tonight (or this morning), but thanks for the tip. I'll check it out.
Mar 20 '08 #3

P: 19
By change to do you have something defined in the Startup options in the database under Tools -> Startup?

If so, that needs to be changed to a blank.

The reason that may be doing that is if you're trying to open the form more than once, or two forms or two operations going on at the same time...

If that doesn't solve it, let me know.

Joe P.
Hi Joe,

I didn't have anything set under startup except for an icon. Would that be enough to cause this? Today when I opened, it halted during the load event of the second form. No explanation, no error. I keyed F5 and it just continued like it should have done to start with.

Ideas?

Thanks
Mar 20 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.