Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DO FORM unexpectedly returns, but form is still there
Message
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01310904
Message ID:
01311470
Views:
34
Something like this (from the VFP help) early in your main program ---

ON ERROR DO errHandler WITH ;
ERROR( ), MESSAGE( ), MESSAGE(1), PROGRAM( ), LINENO( )

* At end of main program
ON ERROR && Restores system error handler.

PROCEDURE errHandler
PARAMETER merror, mess, mess1, mprog, mlineno
CLEAR
? 'Error number: ' + LTRIM(STR(merror))
? 'Error message: ' + mess
? 'Line of code with error: ' + mess1
? 'Line number of error: ' + LTRIM(STR(mlineno))
? 'Program with error: ' + mprog
ENDPROC


>Mike,
>
>Thanks for you suggestion. Could you clarify it for me? Not quite sure what you are suggesting.
>
>Jim
>
>>How is your error handler set up? It sounds like it might be turned off. You might try turning it on, if only temporarily to track this error.
>>
>>>Tamar,
>>>
>>>I will look into that. In the meantime, any thoughts on why the Syntax Error message has absolutely no other information with it. No object, method, line, etc. That must be a clue.
>>>
>>>Jim
>>>
>>>>>I failed to mention that if I remove the DODEFAULT() call in the form's refresh method, the only syntax error message I get is on the line in the calling form that executes the DO FORM command to run my problem form. and, as before, the problem form appears on the screen and is apparently functional.
>>>>>
>>>>
>>>>Jim - I wonder if you have an issue with a ControlSource for some control on the form. When you reach Refresh, that ControlSource may be unable to be evaluated.
>>>>
>>>>Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform