Hi Everyone,
Users get the odd error on a multi-page form when I try to validate an editbox control on page 1 of the form. The validation is in the "Save" method and for some reason it seems .Value or .Text cannot be evaluated. The form is still open when the .SaveBeforeAnything() method fires:
Here is the code abbreviated:
WITH THISFORM.pgfDEForms.Page1
IF EMPTY(.edtOpeningComments.Text)
Error logged: #1113 "File is not open." The cursor is indeed open so it is not a case of the view not being open yet.
I used to check property .Value but that seemed to occasionally cause crashes. So I switched to .Text but it too has the odd prob. Note that I moved away from checking the underlying view (v_Qotes.OpeningComments) as it seemed that checking the .Value of controls was overall more "accurate" and always up to date (I had instances where the cursor did not immediately reflect the value of the control and so I moved to always querying the control for anything I needed).
Stepping through the code, at times the control's .text or .value can be evaluated and at other times it cannot (I think maybe the debugger is being thrown off by tabbing back and forth between it and the VFP session).
What's up with this behaviour?
TIA,
Albert