B
Benny
I want to create a command button in a form that will open another Microsoft
Access database located in a network drive. However, there seems to be an
issue with the path.
During the creation of a command button in a form to run an application
(using the wizard), it asks for the path of the application you want to run.
After typing the command line (path) and the process of creating the command
button is finished and the button is clicked, the following error occurs:
"Microsoft Office Access: File not found"
The command button VB code appears to work as far as opening the Microsoft
Access application. However, MS Access does not find the mdb file.
Both database files (the one I am creating the command button and the one I
am trying to open) resides in different network drives. However, I created
several command buttons with different paths in order to eliminate the
possibility of issues with network mapping. The following scenarios were
created and tested in order to map different paths to the command button:
 Having both mdb files in the root directory of my computer
 Having one mdb in the network drive and one in the root directory
 Having both mdb files in separate network drives
 Having both mdb files in the same network drive
All of the command buttons created brings the same error described above
when clicked.
I have the following code for the command button in VB (the path is to a
network drive):
Private Sub RVOA_DB_Click()
On Error GoTo Err_RVOA_DB_Click
Dim stAppName As String
stAppName = "Access.exe S:\apps\RVOA\RVOADatatble.mdb"
Call Shell(stAppName, 1)
Exit_RVOA_DB_Click:
Exit Sub
Err_RVOA_DB_Click:
MsgBox Err.Description
Resume Exit_RVOA_DB_Click
End Sub
Any suggestions?
Thanks
Access database located in a network drive. However, there seems to be an
issue with the path.
During the creation of a command button in a form to run an application
(using the wizard), it asks for the path of the application you want to run.
After typing the command line (path) and the process of creating the command
button is finished and the button is clicked, the following error occurs:
"Microsoft Office Access: File not found"
The command button VB code appears to work as far as opening the Microsoft
Access application. However, MS Access does not find the mdb file.
Both database files (the one I am creating the command button and the one I
am trying to open) resides in different network drives. However, I created
several command buttons with different paths in order to eliminate the
possibility of issues with network mapping. The following scenarios were
created and tested in order to map different paths to the command button:
 Having both mdb files in the root directory of my computer
 Having one mdb in the network drive and one in the root directory
 Having both mdb files in separate network drives
 Having both mdb files in the same network drive
All of the command buttons created brings the same error described above
when clicked.
I have the following code for the command button in VB (the path is to a
network drive):
Private Sub RVOA_DB_Click()
On Error GoTo Err_RVOA_DB_Click
Dim stAppName As String
stAppName = "Access.exe S:\apps\RVOA\RVOADatatble.mdb"
Call Shell(stAppName, 1)
Exit_RVOA_DB_Click:
Exit Sub
Err_RVOA_DB_Click:
MsgBox Err.Description
Resume Exit_RVOA_DB_Click
End Sub
Any suggestions?
Thanks