J
John Baker
I would like to open an Access database from another access database form
and set the workgroup file for the new database.
I have tried to open a shortcut file from the code of the form but not sure
how to do it correctly.
I have also tried using the shell command and the command line equivalent to
opening the databse with the correct workgroup. It seems to work OK except
when there are spaces in the path name folders or in the database file name.
Can any one help me with the syntax to account for spaces?
The code I used successfully is below. I aslo will need to replace the
actual pathnames and file names with variables to make the code generic for
whichever database file is chossen to be open. Again the names may include
spaces.
Dim RetVal
Const q As String * 1 = """"
varSitewide = "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" & "
" & "C:\BMS\SiteWide\SiteWideLog.mdb" & " " & "/wrkgrp" & q &
"H:\BMS\Databases\MSAccessWorkgroups\SYSTEMaaa.MDW"
RetVal = Shell(varSitewide, 1)
Any help greatly appreciated
John B
and set the workgroup file for the new database.
I have tried to open a shortcut file from the code of the form but not sure
how to do it correctly.
I have also tried using the shell command and the command line equivalent to
opening the databse with the correct workgroup. It seems to work OK except
when there are spaces in the path name folders or in the database file name.
Can any one help me with the syntax to account for spaces?
The code I used successfully is below. I aslo will need to replace the
actual pathnames and file names with variables to make the code generic for
whichever database file is chossen to be open. Again the names may include
spaces.
Dim RetVal
Const q As String * 1 = """"
varSitewide = "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" & "
" & "C:\BMS\SiteWide\SiteWideLog.mdb" & " " & "/wrkgrp" & q &
"H:\BMS\Databases\MSAccessWorkgroups\SYSTEMaaa.MDW"
RetVal = Shell(varSitewide, 1)
Any help greatly appreciated
John B