473,545 Members | 2,092 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Auto Exec macro hangs after compact/repair

19 New Member
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 SetStartupPrope rties
DoCmd.OpenForm "frmSplash" , acNormal, , , , acWindowNormal
DoCmd.OpenForm "frmLoginMa in", acNormal, , , , acDialog

End Function
Mar 19 '08 #1
3 2699
PianoMan64
374 Recognized Expert Contributor
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
Fiddler2
19 New Member
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
Fiddler2
19 New Member
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

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

Similar topics

6
5563
by: KEVIN97810 | last post by:
Hello to all, Assume my mdb name is Cust.MDB. I want to compact & repair the same Cust.MDB when the user exit the program. Is there a way you can do it in code behind the EXIT button. I am dumping data from SQL to temp table and also delete from these tables in Cust.MDB. This would cause the MDB to get big. So I just want some code to...
3
5559
by: Paolo | last post by:
Hi, I am trying to compact and repair my database, however every time I try it comes up a message saying: Table: "TempMSysAccessObject already exists", whenever I try to look for this table I cannot find it anywhere... Any clues... Already went into the help file and nothing... Also try to copy my database and the same message comes up
4
2066
by: Wayne | last post by:
Does "Compact On Close" do a "Compact and Repair" or just a compact. Is a compact necessary (or at least a good idea) on a regular basis, say weekly, for a database that has several hundred records per week added to it? TIA.
3
11220
by: trueblue7 | last post by:
I apologize if this question has been asked before... I'm trying to reset autonumber fields back to 1. The autonumber fields are part of the composite primary keys. I followed the MS help with a temp table and append query. I can change the number to anything but 1. I'm using Access XP and saving as 2000. Any help is appreciated.
2
1865
by: ApexData | last post by:
Hello I have finally completed an application and am preparing to install it on a network of 10 users. The application will be split FE/BE. The application has its own login, which controls the users ability to either ViewOnly or FullRights. Using Access2K. 20MB Database. My questions pertain to CompactOnClose:
2
2775
by: Ron | last post by:
Hi All, Using WinXP pro/Access 2000. I have a database that's been used for about 5 months. Transferred lots of data from a dos based program, then the users have been using it for that 5 months. About 180000 records in one of the main files (maybe 25000 new since the dos conversion). Been having some speed issues crop up along the way...
9
3982
by: Ron | last post by:
New discovery. If I take a perfectly good database, and "compact/repair" on it with Access 2000 (seems to be at multiple sites--I've tried it with my system here, at another office on an entirely different network), it damages the file somehow. The user's machine that did the compact/repair can see the file fine. But any networked user...
3
2195
by: Bizmark | last post by:
Access2003, Windows XP Pro OEM user OS, Windows Sever 2000 server OS. Not-so-recently I inherited 3 Access DB's from another company merging with our own. Our own system works off of SQL server, but mainting these databases is critical to keeping the business running. 1 database in particular has been causing problems. Along the course we...
4
3160
by: zufie | last post by:
When I Repair/Compact my Access databse. I get icons/copies of a database named db1.mdb, db2.mdb, db3.mdb, etc... How else may I repair this database? Thanks!, Zuf
0
7408
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7661
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7433
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7763
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5340
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3458
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3444
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1020
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
712
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.