I am using the following code to open an access database with the Shell function...
I get an error when Me.Location = "D:\Documents and Settings\tex1pde\My Documents\EmpCencus.mdb"
I believe it has something to do with the spaces in 'Documents and Settings' and 'My Documents'. Any help appreciated.
Phil Edards
Code:
Private Sub cmdOpenDatabase_Click()
Dim strPath As String
Dim RetVal As Double
strPath = "c:\progra~1\micros~2\office10\msaccess.exe " & Me.Location
RetVal = Shell(strPath, 1)
End Sub
I get an error when Me.Location = "D:\Documents and Settings\tex1pde\My Documents\EmpCencus.mdb"
I believe it has something to do with the spaces in 'Documents and Settings' and 'My Documents'. Any help appreciated.
Phil Edards