Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error in vfp9 not in vfp8
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01014630
Message ID:
01014660
Views:
21
Glad the solution worked for you, Kendall...

However, Sergey and Hugo are correct in that name expressions would be the preferable way to handle this (like the code that Hugo posted).

It's easier to read and it's much faster to execute.

--Brad


>Thanks for the suggestions, but my original post only includes an example of how my code is working. The application is a campus housing program. A form contains a label for each room in a dorm and the caption of the label displays who is housed in that room. So, macro expansion is the most effecient way to populate the captions.
>
>However, I have found a solution.
>
>Brad Schulz, offered some help via foxite.com
>
>The solution is to use brackets [ ] when populating m.cName
>
>ex..
>*********************************************
>> *initialize variables
>> local m.cName,m.cMacro
>>
>> *Store Name to var
>> m.cName = ['bla bla ' + chr(13) + 'alb alb']
>>
>> *Store command to var
>> m.cMacro = "thisform.lblRoom.caption = " + m.cName
>>
>> *Execute command
>> &cMacro.
>>
>> *********************************************
Previous
Reply
Map
View

Click here to load this message in the networking platform