"Invalid procedure call or argument" error

D

Dan Merth

Greetings,

I created a simple Access database that for the most
part seems to run fine, however I am having a problem
with a command button (created using the wizard) that I
added to one of the subforms. This command button is
supposed to open up the Notepad.exe application, and
display a specified .txt file.

The odd thing is that this button works perfectly on
Windows XP and Windows 2000 PCs, but this database also
needs to be used on some Windows 98 computers, and when
the button is clicked by a user on a 98 machine, the
error "Invalid procedure call or argument" appears, and
the .txt file never shows up.

It does not appear to matter if the client version of
Access is 2000, or 2002. I tried upgrading one of the
Windows 98 PCs to Office 2002, and I installed the Office
2000 SR1 service pack on another one, to no avail. I've
included the code for the button below:


Private Sub ALCPhyEdTxt_Click()
On Error GoTo Err_ALCPhyEdTxt_Click

Dim stAppName As String

stAppName = "N:\JDCSchoolProgram\notepad.exe
n:\JDCSchoolProgram\ALCPhyEd.txt"
Call Shell(stAppName, 1)

Exit_ALCPhyEdTxt_Click:
Exit Sub

Err_ALCPhyEdTxt_Click:
MsgBox Err.Description
Resume Exit_ALCPhyEdTxt_Click

End Sub



So I would really appreciate any ideas! Thank you.

Dan Merth
 
K

Ken Snell

My first guess is that the Windows 98 machine does not have an N drive
mapped. My second guess is that there is no Notepad.exe file at the
specified location on N drive.
 

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

Similar Threads


Top