Compact a secured db

  • Thread starter Thread starter Connie
  • Start date Start date
C

Connie

I have used a db that opens a form where you enter the full path, including
db name that you want to compact. It works fine as long as the db you are
compacting is not secured. The code is using the CompactDatabase method of
the DBEngine
object. I tried passing the full path including /wrkgrp "path to mdw" (like
you would in a shortcut) to the olddb part of the syntax but I get "Not a
valid filename". Any suggestions on how to compact via code?

BTW, this was created back in Access97 but has been converted up to XP.

TIA
Connie
 
Connie said:
I have used a db that opens a form where you enter the full path, including
db name that you want to compact. It works fine as long as the db you are
compacting is not secured.

Actually it works if you are joined to the right workgroup. So you can
start a session of Access, where you login using the correct mdw. Then open
your db/form and you should be able to compact just fine.
 
Thank you Joan that worked great!!

Joan Wild said:
Actually it works if you are joined to the right workgroup. So you can
start a session of Access, where you login using the correct mdw. Then open
your db/form and you should be able to compact just fine.
 
Back
Top