That's a bit weird, but I vaguely remember I had some problems with pageframes and value property of textboxes in VFP6. You may try to search my old threads for this kind of problem, but for now try to do something like
if type('thisform.pgMyPageFr.Page1.myEditBox.value') = 'C'
lcValue = thisform.pgMyPageFr.Page1.myEditBox.value
...
endif
This will help to track the problem.
>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
>
>*** other checks ...
>
>* Debug: check the ".text" property not the .value property as the .value property can cause a bomb
>
>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
If it's not broken, fix it until it is.
My Blog