Discussion:
Passing Parameter in Shell Command - * * H E L P * *
(too old to reply)
Jasmine
2008-02-19 21:37:28 UTC
Permalink
Hi All,

I want to pass a parameter string to a shell script command but the
script is not interpreting the passed parameter.

This is the command :

paperclipargs= "Cases|ABEL |DAVID |123456789 |10/4/1941 |29 |"

shell ("\\fortress\pclip32\pclipwin.exe -F") &paperclipargs
(The program runs, but does not pass the parameters)

I tried this command from a command line prompt as
illustrated and it works fine

CMD: \\fortress\pclip32\pclipwin.exe -F
"Cases|ABEL|DAVID|123456789|10/4/1941|29|"
( If I use the command above in the Shell command it bombs )

Is there a way I can run the command prompt as shown above from within
MsAccess?
Daniel Pineault
2008-02-20 00:50:02 UTC
Permalink
I'm not 100% sure but it look to me like you're not including your parameter
with the "".

shell (chr(34) & "\\fortress\pclip32\pclipwin.exe -F" & paperclipargs &
chr(34))

If this doesn't work, please post the extract string you'd normally enter
manually in the Dos command window and I'll be able to set some code up based
on your example.
--
Hope this helps,

Daniel Pineault
If this post was helpful, please rate it by using the vote buttons.
Post by Jasmine
Hi All,
I want to pass a parameter string to a shell script command but the
script is not interpreting the passed parameter.
paperclipargs= "Cases|ABEL |DAVID |123456789 |10/4/1941 |29 |"
shell ("\\fortress\pclip32\pclipwin.exe -F") &paperclipargs
(The program runs, but does not pass the parameters)
I tried this command from a command line prompt as
illustrated and it works fine
CMD: \\fortress\pclip32\pclipwin.exe -F
"Cases|ABEL|DAVID|123456789|10/4/1941|29|"
( If I use the command above in the Shell command it bombs )
Is there a way I can run the command prompt as shown above from within
MsAccess?
Jasmine
2008-02-20 14:55:00 UTC
Permalink
Thanks for the response.

the code you've given me didn't work - got a runtime error 53 - file not
found

The Dos command was already posted in my previous email

here it is again:

\\fortress\pclip32\pclipwin.exe -F
"Cases|ABEL|DAVID|123456789|10/4/1941|29|"


ps: don't know how to pass variables from MsAccess to the Dos
command , so i've hard coded the values - but at least I know it
works in this mode.



===================================================
Post by Daniel Pineault
I'm not 100% sure but it look to me like you're not including your parameter
with the "".
shell (chr(34) & "\\fortress\pclip32\pclipwin.exe -F" & paperclipargs &
chr(34))
If this doesn't work, please post the extract string you'd normally enter
manually in the Dos command window and I'll be able to set some code up based
on your example.
--
Hope this helps,
Daniel Pineault
If this post was helpful, please rate it by using the vote buttons.
Post by Jasmine
Hi All,
I want to pass a parameter string to a shell script command but the
script is not interpreting the passed parameter.
paperclipargs= "Cases|ABEL |DAVID |123456789 |10/4/1941 |29 |"
shell ("\\fortress\pclip32\pclipwin.exe -F") &paperclipargs
(The program runs, but does not pass the parameters)
I tried this command from a command line prompt as
illustrated and it works fine
CMD: \\fortress\pclip32\pclipwin.exe -F
"Cases|ABEL|DAVID|123456789|10/4/1941|29|"
( If I use the command above in the Shell command it bombs )
Is there a way I can run the command prompt as shown above from within
MsAccess?
Daniel Pineault
2008-02-20 15:19:01 UTC
Permalink
Jasmine,

Do you mean you enter

\\fortress\pclip32\pclipwin.exe -F

then press enter/return and then at a prompt enter

"Cases|ABEL|DAVID|123456789|10/4/1941|29|"

and press enter/return to launch the sequence?

OR

is this all 1 line

\\fortress\pclip32\pclipwin.exe -F "Cases|ABEL|DAVID|123456789|10/4/1941|29|"

when it is executed?
--
Daniel Pineault
Post by Jasmine
Thanks for the response.
the code you've given me didn't work - got a runtime error 53 - file not
found
The Dos command was already posted in my previous email
\\fortress\pclip32\pclipwin.exe -F
"Cases|ABEL|DAVID|123456789|10/4/1941|29|"
ps: don't know how to pass variables from MsAccess to the Dos
command , so i've hard coded the values - but at least I know it
works in this mode.
===================================================
Post by Daniel Pineault
I'm not 100% sure but it look to me like you're not including your parameter
with the "".
shell (chr(34) & "\\fortress\pclip32\pclipwin.exe -F" & paperclipargs &
chr(34))
If this doesn't work, please post the extract string you'd normally enter
manually in the Dos command window and I'll be able to set some code up based
on your example.
--
Hope this helps,
Daniel Pineault
If this post was helpful, please rate it by using the vote buttons.
Post by Jasmine
Hi All,
I want to pass a parameter string to a shell script command but the
script is not interpreting the passed parameter.
paperclipargs= "Cases|ABEL |DAVID |123456789 |10/4/1941 |29 |"
shell ("\\fortress\pclip32\pclipwin.exe -F") &paperclipargs
(The program runs, but does not pass the parameters)
I tried this command from a command line prompt as
illustrated and it works fine
CMD: \\fortress\pclip32\pclipwin.exe -F
"Cases|ABEL|DAVID|123456789|10/4/1941|29|"
( If I use the command above in the Shell command it bombs )
Is there a way I can run the command prompt as shown above from within
MsAccess?
Jasmine
2008-02-20 16:15:47 UTC
Permalink
Post by Daniel Pineault
this all 1 line
\\fortress\pclip32\pclipwin.exe -F
"Cases|ABEL|DAVID|123456789|10/4/1941|29|"
Jasmine,
Do you mean you enter
\\fortress\pclip32\pclipwin.exe -F
then press enter/return and then at a prompt enter
"Cases|ABEL|DAVID|123456789|10/4/1941|29|"
and press enter/return to launch the sequence?
OR
is this all 1 line
\\fortress\pclip32\pclipwin.exe -F
"Cases|ABEL|DAVID|123456789|10/4/1941|29|"
when it is executed?
--
Daniel Pineault
Post by Jasmine
Thanks for the response.
the code you've given me didn't work - got a runtime error 53 - file not
found
The Dos command was already posted in my previous email
\\fortress\pclip32\pclipwin.exe -F
"Cases|ABEL|DAVID|123456789|10/4/1941|29|"
ps: don't know how to pass variables from MsAccess to the Dos
command , so i've hard coded the values - but at least I know it
works in this mode.
===================================================
Post by Daniel Pineault
I'm not 100% sure but it look to me like you're not including your parameter
with the "".
shell (chr(34) & "\\fortress\pclip32\pclipwin.exe -F" & paperclipargs &
chr(34))
If this doesn't work, please post the extract string you'd normally enter
manually in the Dos command window and I'll be able to set some code up based
on your example.
--
Hope this helps,
Daniel Pineault
If this post was helpful, please rate it by using the vote buttons.
Post by Jasmine
Hi All,
I want to pass a parameter string to a shell script command but the
script is not interpreting the passed parameter.
paperclipargs= "Cases|ABEL |DAVID |123456789 |10/4/1941 |29 |"
shell ("\\fortress\pclip32\pclipwin.exe -F") &paperclipargs
(The program runs, but does not pass the parameters)
I tried this command from a command line prompt as
illustrated and it works fine
CMD: \\fortress\pclip32\pclipwin.exe -F
"Cases|ABEL|DAVID|123456789|10/4/1941|29|"
( If I use the command above in the Shell command it bombs )
Is there a way I can run the command prompt as shown above from within
MsAccess?
Daniel Pineault
2008-02-20 15:32:02 UTC
Permalink
Try

paperclipargs = "Cases|ABEL|DAVID|123456789|10/4/1941|29|"
shell ("\\fortress\pclip32\pclipwin.exe -F " & chr(34) & paperclipargs &
chr(34), vbNormalFocus)
--
Hope this helps,

Daniel Pineault
If this post was helpful, please rate it by using the vote buttons.
Post by Jasmine
Thanks for the response.
the code you've given me didn't work - got a runtime error 53 - file not
found
The Dos command was already posted in my previous email
\\fortress\pclip32\pclipwin.exe -F
"Cases|ABEL|DAVID|123456789|10/4/1941|29|"
ps: don't know how to pass variables from MsAccess to the Dos
command , so i've hard coded the values - but at least I know it
works in this mode.
===================================================
Post by Daniel Pineault
I'm not 100% sure but it look to me like you're not including your parameter
with the "".
shell (chr(34) & "\\fortress\pclip32\pclipwin.exe -F" & paperclipargs &
chr(34))
If this doesn't work, please post the extract string you'd normally enter
manually in the Dos command window and I'll be able to set some code up based
on your example.
--
Hope this helps,
Daniel Pineault
If this post was helpful, please rate it by using the vote buttons.
Post by Jasmine
Hi All,
I want to pass a parameter string to a shell script command but the
script is not interpreting the passed parameter.
paperclipargs= "Cases|ABEL |DAVID |123456789 |10/4/1941 |29 |"
shell ("\\fortress\pclip32\pclipwin.exe -F") &paperclipargs
(The program runs, but does not pass the parameters)
I tried this command from a command line prompt as
illustrated and it works fine
CMD: \\fortress\pclip32\pclipwin.exe -F
"Cases|ABEL|DAVID|123456789|10/4/1941|29|"
( If I use the command above in the Shell command it bombs )
Is there a way I can run the command prompt as shown above from within
MsAccess?
Jasmine
2008-02-20 16:27:14 UTC
Permalink
Daniel,

The last codes you've sent me worked like a charm.

(It required a closing bracket, but it's just what the doctor ordered.)

I cannot begin to thank you for your undivided attention to on this problem.

I really appreciate your help.


Jasmine.
Post by Daniel Pineault
Try
paperclipargs = "Cases|ABEL|DAVID|123456789|10/4/1941|29|"
shell ("\\fortress\pclip32\pclipwin.exe -F " & chr(34) & paperclipargs &
chr(34), vbNormalFocus)
--
Hope this helps,
Daniel Pineault
If this post was helpful, please rate it by using the vote buttons.
Post by Jasmine
Thanks for the response.
the code you've given me didn't work - got a runtime error 53 - file not
found
The Dos command was already posted in my previous email
\\fortress\pclip32\pclipwin.exe -F
"Cases|ABEL|DAVID|123456789|10/4/1941|29|"
ps: don't know how to pass variables from MsAccess to the Dos
command , so i've hard coded the values - but at least I know it
works in this mode.
===================================================
Post by Daniel Pineault
I'm not 100% sure but it look to me like you're not including your parameter
with the "".
shell (chr(34) & "\\fortress\pclip32\pclipwin.exe -F" & paperclipargs &
chr(34))
If this doesn't work, please post the extract string you'd normally enter
manually in the Dos command window and I'll be able to set some code up based
on your example.
--
Hope this helps,
Daniel Pineault
If this post was helpful, please rate it by using the vote buttons.
Post by Jasmine
Hi All,
I want to pass a parameter string to a shell script command but the
script is not interpreting the passed parameter.
paperclipargs= "Cases|ABEL |DAVID |123456789 |10/4/1941 |29 |"
shell ("\\fortress\pclip32\pclipwin.exe -F") &paperclipargs
(The program runs, but does not pass the parameters)
I tried this command from a command line prompt as
illustrated and it works fine
CMD: \\fortress\pclip32\pclipwin.exe -F
"Cases|ABEL|DAVID|123456789|10/4/1941|29|"
( If I use the command above in the Shell command it bombs )
Is there a way I can run the command prompt as shown above from within
MsAccess?
Jasmine
2008-02-20 16:31:07 UTC
Permalink
Daniel,
One more question before I leave.

The Soc Security Number is in this format: ###-##-####

What is the code to extract the hyphen

Thanks in advance.
Post by Daniel Pineault
Try
paperclipargs = "Cases|ABEL|DAVID|123456789|10/4/1941|29|"
shell ("\\fortress\pclip32\pclipwin.exe -F " & chr(34) & paperclipargs &
chr(34), vbNormalFocus)
--
Hope this helps,
Daniel Pineault
If this post was helpful, please rate it by using the vote buttons.
Post by Jasmine
Thanks for the response.
the code you've given me didn't work - got a runtime error 53 - file not
found
The Dos command was already posted in my previous email
\\fortress\pclip32\pclipwin.exe -F
"Cases|ABEL|DAVID|123456789|10/4/1941|29|"
ps: don't know how to pass variables from MsAccess to the Dos
command , so i've hard coded the values - but at least I know it
works in this mode.
===================================================
Post by Daniel Pineault
I'm not 100% sure but it look to me like you're not including your parameter
with the "".
shell (chr(34) & "\\fortress\pclip32\pclipwin.exe -F" & paperclipargs &
chr(34))
If this doesn't work, please post the extract string you'd normally enter
manually in the Dos command window and I'll be able to set some code up based
on your example.
--
Hope this helps,
Daniel Pineault
If this post was helpful, please rate it by using the vote buttons.
Post by Jasmine
Hi All,
I want to pass a parameter string to a shell script command but the
script is not interpreting the passed parameter.
paperclipargs= "Cases|ABEL |DAVID |123456789 |10/4/1941 |29 |"
shell ("\\fortress\pclip32\pclipwin.exe -F") &paperclipargs
(The program runs, but does not pass the parameters)
I tried this command from a command line prompt as
illustrated and it works fine
CMD: \\fortress\pclip32\pclipwin.exe -F
"Cases|ABEL|DAVID|123456789|10/4/1941|29|"
( If I use the command above in the Shell command it bombs )
Is there a way I can run the command prompt as shown above from within
MsAccess?
Daniel Pineault
2008-02-20 16:52:01 UTC
Permalink
Use the replace function

replace("###-##-####","-","") - I think but check the help file to confirm
the proper synthax
--
Hope this helps,

Daniel Pineault
If this post was helpful, please rate it by using the vote buttons.
Post by Jasmine
Daniel,
One more question before I leave.
The Soc Security Number is in this format: ###-##-####
What is the code to extract the hyphen
Thanks in advance.
Post by Daniel Pineault
Try
paperclipargs = "Cases|ABEL|DAVID|123456789|10/4/1941|29|"
shell ("\\fortress\pclip32\pclipwin.exe -F " & chr(34) & paperclipargs &
chr(34), vbNormalFocus)
--
Hope this helps,
Daniel Pineault
If this post was helpful, please rate it by using the vote buttons.
Post by Jasmine
Thanks for the response.
the code you've given me didn't work - got a runtime error 53 - file not
found
The Dos command was already posted in my previous email
\\fortress\pclip32\pclipwin.exe -F
"Cases|ABEL|DAVID|123456789|10/4/1941|29|"
ps: don't know how to pass variables from MsAccess to the Dos
command , so i've hard coded the values - but at least I know it
works in this mode.
===================================================
Post by Daniel Pineault
I'm not 100% sure but it look to me like you're not including your parameter
with the "".
shell (chr(34) & "\\fortress\pclip32\pclipwin.exe -F" & paperclipargs &
chr(34))
If this doesn't work, please post the extract string you'd normally enter
manually in the Dos command window and I'll be able to set some code up based
on your example.
--
Hope this helps,
Daniel Pineault
If this post was helpful, please rate it by using the vote buttons.
Post by Jasmine
Hi All,
I want to pass a parameter string to a shell script command but the
script is not interpreting the passed parameter.
paperclipargs= "Cases|ABEL |DAVID |123456789 |10/4/1941 |29 |"
shell ("\\fortress\pclip32\pclipwin.exe -F") &paperclipargs
(The program runs, but does not pass the parameters)
I tried this command from a command line prompt as
illustrated and it works fine
CMD: \\fortress\pclip32\pclipwin.exe -F
"Cases|ABEL|DAVID|123456789|10/4/1941|29|"
( If I use the command above in the Shell command it bombs )
Is there a way I can run the command prompt as shown above from within
MsAccess?
ΞΙΦΙΛΙΔΟΥ ΑΓΑΠΗ
2008-03-08 09:23:33 UTC
Permalink
Post by Jasmine
Hi All,
I want to pass a parameter string to a shell script command but the
script is not interpreting the passed parameter.
paperclipargs= "Cases|ABEL |DAVID |123456789 |10/4/1941 |29 |"
shell ("\\fortress\pclip32\pclipwin.exe -F") &paperclipargs
(The program runs, but does not pass the parameters)
I tried this command from a command line prompt as
illustrated and it works fine
CMD: \\fortress\pclip32\pclipwin.exe -F
"Cases|ABEL|DAVID|123456789|10/4/1941|29|"
( If I use the command above in the Shell command it bombs )
Is there a way I can run the command prompt as shown above from within
MsAccess?
John Spencer
2008-03-11 16:01:49 UTC
Permalink
I would try adding quote marks to the string you are passing

paperclipargs= CHR(34) & "Cases|ABEL |DAVID |123456789 |10/4/1941 |29 |"
& Chr(34)

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
Post by Jasmine
Hi All,
I want to pass a parameter string to a shell script command but the
script is not interpreting the passed parameter.
paperclipargs= "Cases|ABEL |DAVID |123456789 |10/4/1941 |29 |"
shell ("\\fortress\pclip32\pclipwin.exe -F") &paperclipargs
(The program runs, but does not pass the parameters)
I tried this command from a command line prompt as
illustrated and it works fine
CMD: \\fortress\pclip32\pclipwin.exe -F
"Cases|ABEL|DAVID|123456789|10/4/1941|29|"
( If I use the command above in the Shell command it bombs )
Is there a way I can run the command prompt as shown above from within
MsAccess?
Loading...