First guess is bad path and file names. Make a copy of the source db and
name it a.mdb. Put it in the root directory of C:\. Run this code in an
Access 97 module:
DAO.DBEngine.CompactDatabase "C:\a.mdb", "C:\a_cmpact.mdb"
Does that work? If it doesn't, try a Windows shortcut with the /compact
switch. Make sure you use the full path to Access 97 and the full path to
the db. Example (all one line):
"C:\Program Files\Microsoft Office\OFFICE97\Msaccess.exe" "C:\database\db1.
mdb" /compact
Does that work?
Second guess is the DAO350.DLL needs to be reregistered.
Regsvr32.exe "C:\Program Files\Common Files\Microsoft Shared\DAO\DAO350.DLL"
I just had a thought. The source db you're trying to compact in Access 97
*is* an Access 97/Jet 3.5 db, right? Not a Jet 4.0 db?
Chris
Microsoft MVP
>I have Access 97, 2000 and 2003 all running on a Win XP box after having
>just reinstalled XP. Among other problems, I find that Access 97 will
[quoted text clipped - 16 lines]
>
>Owen Jenkins
Owen Jenkins - 13 May 2008 06:56 GMT
Hi Chris,
Thanks for the reply but this didn't help. It is not an issue of path or
file names. I have reregisted DAO350.DLL successfully but this hasn't
helped. And yes, it is Access 97/Jet 3.5, not 4.0.
Owen
Chris O'C - 13 May 2008 16:09 GMT
When you installed Access 97, did you also install SR-1, SR-2, Jet 3.51 and
its SPs? Make sure you also install the latest MDAC files. For Windows XP
SP-2 or newer, you need MDAC 2.8 SP-1. If you need earlier SPs than the ones
listed below, you'll be prompted to install the earlier ones when you try to
install these.
Office 97 SR-2b
http://office.microsoft.com/en-us/help/HA010449951033.aspx
Microsoft Jet 3.5 Service Pack 3
http://support.microsoft.com/kb/172733/en-us
MDAC downloads (including component checker)
http://msdn.microsoft.com/en-us/data/aa937730.aspx
More info
http://support.microsoft.com/kb/240377/en-us
Chris
Microsoft MVP
>Hi Chris,
>
[quoted text clipped - 3 lines]
>
>Owen
Owen Jenkins - 15 May 2008 01:04 GMT
Thanks! I forgot all about SP1/SP2. SP1 didn't help, but SP2 fixed the
compact problem. I'll do the Jet updates too. Thanks again. Owen
Chris O'C - 15 May 2008 12:37 GMT
Glad it's working now. The SPs are easy to forget, but they're must-haves,
especially for Office 2000.
Chris
Microsoft MVP
>Thanks! I forgot all about SP1/SP2. SP1 didn't help, but SP2 fixed the
>compact problem. I'll do the Jet updates too. Thanks again. Owen