ShellExecute with Mdw file

W

Weste

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
 
T

TC

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
 
T

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top