I have been using the following code to compact and repair a backend that is not password protected: Dim stAppName As String stAppName = "MSACCESS.EXE " & """" & Katalognamn() & "Test_be" & """" & "/nostartup /compact" Call Shell(stAppName, vbNormalNoFocus) and it works exactly as I want to. But now I have a password protected backend database (I am not using any profiles or so at all so it is just a password nothing else) I have tried the "/pwd xxxx" option but it seems like it wants me to also enter a user name and a password for that user - and I am not using user names for protection at all! How to solve this??? I am using Access 2003 Many thanks in advance! Anders
Try entering Admin as the user name (that's the default user) -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Anders" wrote in message news:625E45FF-A707-4350-B98F-087A1A2C65D4@microsoft.com... >I have been using the following code to compact and repair a backend that >is > not password protected: > > Dim stAppName As String > stAppName = "MSACCESS.EXE " & """" & Katalognamn() & "Test_be" & """" & > "/nostartup /compact" > Call Shell(stAppName, vbNormalNoFocus) > > and it works exactly as I want to. But now I have a password protected > backend database (I am not using any profiles or so at all so it is just a > password nothing else) > > I have tried the "/pwd xxxx" option but it seems like it wants me to also > enter a user name and a password for that user - and I am not using user > names for protection at all! How to solve this??? > > I am using Access 2003 > > Many thanks in advance! > > Anders
Performing a Compact and repair on a database should only ever be done from the machine where the database actually resides to reduce the risk of corruption that network traffic could cause. "Anders" wrote: > I have been using the following code to compact and repair a backend that is > not password protected: > > Dim stAppName As String > stAppName = "MSACCESS.EXE " & """" & Katalognamn() & "Test_be" & """" & > "/nostartup /compact" > Call Shell(stAppName, vbNormalNoFocus) > > and it works exactly as I want to. But now I have a password protected > backend database (I am not using any profiles or so at all so it is just a > password nothing else) > > I have tried the "/pwd xxxx" option but it seems like it wants me to also > enter a user name and a password for that user - and I am not using user > names for protection at all! How to solve this??? > > I am using Access 2003 > > Many thanks in advance! > > Anders