opening other access databases and excel

cyberpac9

Registered User.
Local time
Today, 06:23
Joined
Jun 6, 2005
Messages
70
we have a database (*.adp frontend to SQL Server 2K) where we keep our records, however we want to be able to just view other info we might use to make decisions. this info is kept in different files - access *.mdb and excel *.xls files. here is the code i have to open these files (stored on our networked drive):

Code:
Private Sub cmdOHS_Click()
On Error GoTo Err_cmdOHS_Click

    Dim stAppName As String

    stAppName = "J:\DATA\Records\attend.mdb"
    Call Shell(stAppName, 1)

Exit_cmdOHS_Click:
    Exit Sub

Err_cmdOHS_Click:
    MsgBox Err.Description
    Resume Exit_cmdOHS_Click
    
End Sub
and


Code:
Private Sub cmdEM_Click()
On Error GoTo Err_cmdEM_Click

    Dim stAppName As String

    stAppName = "J:\DATA\Records\List.xls"
    Call Shell(stAppName, 1)

Exit_cmdEM_Click:
    Exit Sub

Err_cmdEM_Click:
    MsgBox Err.Description
    Resume Exit_cmdEM_Click
    
End Sub

however, i get this error:
"Invalid procedure call or argument."

how do i open the two files from within my *.adp file?
 

Users who are viewing this thread

Back
Top Bottom