>I am now happily using WIN 10 if that matters.
>
>I I have a new install of VFP9 on this new box.
>
>This time, I left the spaces in the folder named "Visual Foxpro Projects".
>
>Yesterday and today an error popped up I have never before experienced in this old program. Error #36.
>
>Yesterday it was on a do form command, and today it was on a report form command. In both cases I have stored the form name or report name in an mv and then use the "&" to expand the mv.
>
>As in report form &MyReport to printer prompt or ;
>do form &MyForm with X,Y,Z to m.MyReturnValue.
>
>I solved the problem by using parentheses around the mv rather than the "&".
>
>The age old question would be, Why all of a sudden I would be faced with these errors?
>
>Did I forget one of the service packs or something? My VFP 9 version number is: 09.00.0000.5815.
You're getting the error because of the spaces in the path to your command. Macro expansion expands the contents of the variable
before it's executed. So:
REPORT FORM C:\SomeFolder\Visual FoxPro Projects\MyReport.frx ...
As you've discovered, using a name expression in places where VFP is expecting a name is the way to go:
https://msdn.microsoft.com/en-US/library/4kxhy0aa%28v=vs.80%29.aspx . Macro expansion help at
https://msdn.microsoft.com/en-US/library/1509cc9c%28v=vs.80%29.aspxIn general macro expansion should be your last resort. The order I use is:
1. Name expressions (preferred where applicable)
2. EVALUATE( )
3. & / macro expansion
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up