Change User/Logging off

G

Guest

I want to close a database and reopen it with certain command line options
("C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
"c:\finalproject\sjacadets.mdb" /wrkgrp c:\finalproject\system.mdw) it has to
be able to be run from a button, can anyone help?

and I haved also got this bit of code can anyone help me stick the two
together

Dim sCommand as String, lTaskID as long
sCommand = """" & SysCmd(acSysCmdAccessDir) & "msaccess.exe """ _
& CurrentDb.Name & """ /wrkgrp:""" & SysCmd(acSysCmdGetWorkgroupFile) _
& """" ' and add any other switches you require here
lTaskID = Shell(sCommand, vbMaximizedFocus)
If lTaskID <> 0 Then AppActivate lTaskID
DoCmd.Quit
 

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

Similar Threads

Logging off 4
can someone help with this code? 1
change user 1
logging off 1

Top