How do I have user look up file address and...

M

Mike Madison

add it into script to run sync?

The script used to sync data requires fullname of file, including drive
letter. Some users map the network folder to differing drive letters. I
want to write a script to allow the user to browse to the location of the
network data file and then drop the file name
("P:\networkfoldername\appname\data\data.mdb") into the script below to sync
to the local data file.


intMsgBoxReply = Msgbox("Do you want to Syncronize your data file?",
vbOKCancel)

If intMsgBoxReply = 1 Then

DoCmd.Beep
DoCmd.Hourglass (True)
varRet = SysCmd(acSysCmdSetStatus, "Syncronizing, please wait...")
DBEngine.Workspaces(0).OpenDatabase("d:\data\data.mdb").Synchronize
"P:\networkfoldername\appname\data\data.mdb", dbRepImpExpChanges
varRet = SysCmd(acSysCmdClearStatus)
DoCmd.Hourglass (False)
DoCmd.Beep

End If
 

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