>How do I pass a command line parameter to a Dos Foxpro 2.6 executable from Visual foxpro. The below code does not work.
>
>prmstartdate = date()-15
>prmenddate = date()
>! /n C:\work\acct\acct05.exe prmstartdate prmenddate
>
>Receiving program.
>
>Param prmstartdate, prmenddate
>
>
>Problem is the values in the variables are displayed as prmstartdate and not the value.
It depends what is acct05.exe expecting. If it's expecting two date strings, give it strings - i.e. do what Dave Bower said. You may need to surround them with quotes, maybe (again, depending on what it expects) like this, and may need to convert them to strings beforehand:
! /n C:\work\acct\acct05.exe "&prmstartdate" "&prmenddate"
OTOH, if it's a Fox executable, you can call it directly:
do c:\work\acct\acct05.exe with prmStartDate, prmEndDate