Invalid Procedure Call or argument

G

Guest

I have created a switchboard with 3 buttons. Each button takes you to a
separate data entry screen. When you click on the button I get this error
message "Invalid procedure Call or argument". Can someone help me here as I
cannot find anything in the code that looks wrong.

Here is the code for the button:

Private Sub Child_Immunizations_Click()
On Error GoTo Err_Child_Immunizations_Click

Dim stAppName As String

stAppName = "W:\Profiling\QM_Log\CH_IMMU_RIPA_QM_FollowUp.mdb"
Call Shell(stAppName, 1)

Exit_Child_Immunizations_Click:
Exit Sub

Err_Child_Immunizations_Click:
MsgBox Err.Description
Resume Exit_Child_Immunizations_Click

End Sub
 
G

Guest

you should also provide the opening application.

stAppName = "msaccess.exe W:\Profiling\QM_Log\CH_IMMU_RIPA_QM_FollowUp.mdb"

if necessary also include the path
e.g.

stAppName = replace("'c:\program files\Microsoft
office\office11\msaccess.exe'
W:\Profiling\QM_Log\CH_IMMU_RIPA_QM_FollowUp.mdb","'",chr(34))

pay attention to the single quotes which get replaced.


- Raoul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top