I am using the following code from within Access to try and open a specific file that will show data from the database on a map. Not sure why I get an error stating :
Could not find file L:\R&D.mxd
I don't see how I have asked it to open this file.
I am using Access 2010 and the program and file paths are correct. The file part of the code works as the application does open; it just doesn't open the file I want.
Code:
Private Sub Command0_Click()
Dim x As Variant
Dim Path As String
Dim File As String
Path = "C:\Program Files (x86)\ArcGIS\Desktop10.2\bin\ArcMap.exe"
File = "L:\R&D Section\Databases\Access databases\2016 survey\zika cases.mxd"
x = Shell(Path + " " + File, vbNormalFocus)
End Sub