Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to avoid error for undefined var with TEXTMERGE?
Message
 
To
18/03/2002 12:23:13
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00633781
Message ID:
00634463
Views:
23
>Hi Eric.
>
>>My problem is that, if there is an error in the file, specifically the lname variable is not defined, the TEXTMERGE gives an error. Is there a way to make it work like the TEXT...ENDTEXT command that just put nothing in the replacement in this case but don't produce any error?
>
>How about having your error handler just RETURN if the error occurs while using TEXTMERGE()? I do that using code like:
This.lTextMerge = .T.
>textmerge(whatever)
>This.lTextMerge = .F.
>
>function Error...
>if This.lTextMerge
>  return
>else
>  rest of code
>endif
Doug

Many thanks Doug. Most of the time the solution is so simple!
Eric Crespin
Consultant
PC PLUS Software Inc.
www.pcplus.ca
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform