call shell function in ms access not going to currentproject path
Posted on 2014-07-17
this code is not changing directory to the current project path. my access database is in several directories and I need to reference the current path.
the following code works fine, but not the flexible to current directory
Call Shell("cmd.exe /k cd\priworkfile\temp\zfws-6-1-14-mastergtest && wxfws.py", vbNormalFocus)
this code does not cd to the currentdirectory
Private Sub Command7_Click()
Dim NewName As String
Dim OldName As String
OldName = CurrentProject.Path
NewName = Right(OldName, Len(OldName) - 2)
'Dim Shell As String
Call Shell("cmd.exe /k cd (NewName)" & """wxfws.py""", vbNormalFocus)
would appreciate the correct setting to change to the current directory.