Is anyone else in the database? (is it on a network?)
Do you get a message to the effect that it is read-only at any time?
Is there enough space on the drive? (Access needs approx 2 times the size of the current *.mdb to compact and repair.) How big is this *.mdb?
Try holding the shift key down and opening the mdb. Once it's opened, close it. Then check and see if there is an *.ldb file in the folder.
In Tools -> Startup, Select None for the Display Form/Page so no forms startup (if there are any). Temporarily rename the Autoexec macro to AutoexecBAK if there is one. Open the form (holding down the shift key). Run Tools -> Database Utilities -> Compact and Repair. Close and check for an *.ldb file (if there is one, again, make sure NO ONE is in it.) If there is none, immediately make a copy of the database so you have a backup!! Then rename the AutoexecBAK macro to Autoexec or put the Startup form back in.
An *.ldb file present in the folder means either someone is in the *.mdb or the *.ldb is corrupt and could not be deleted when all user's close out of the *.mdb
Remember - backups are your friends (and it only takes a few seconds to copy/paste an mdb file.)
Worst comes to worst, you can create a new *.mdb file and import the tables/forms/queries/reports/modules/macros from this one into your new one.
Last edited by pkstormy; 10-15-07 at 18:19.
Expert Database Programming
MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)