ShellExecute with Mdw file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to use the ShellExecute function to open an access database with
a mdw file. Below is the code I am using.

lngRet = ShellExecute(Me.hWnd, "open", """c:\test\mdw test\secure
test.mdb""", "/wrkgrp ""c:\test\mdw test\secure.mdw""", "", 1)

The database opens; however when I type ?dbengine.systemdb in the Immediate
Window it shows that the default mdw file is being used and not the mdw file
I specified. Any help would be greatly appreciated.

Weste
 
You have to invoke Access explicitly in order to use the /wrkgrp
switch:

msaccess.exe my.mdb /wrkgrp my.mdw

Not:

my.mdb /wrkgrp my.mdw

HTH,
TC
 
And anther thing! If your secured database opens, at all, with the
standard (default) workgroup file, then it has not been secured
correctly. You must have missed a step. A properly secured database
will not open, at all, using the wrong workgroup file.

HTH,
TC
 
Back
Top