General information
Category:
Coding, syntax & commands
Good morning !
Sorry I took so long in answering but between customers and a bit of programming to sort this one out I did not have time to provide some feedback. Special thanks to Fred and Jerry for your analysis that made me think a little farther and come up with this 4 steps solution.
In oForm.PageFrame.Page1.MyControlA.Valid
-test for change in MyControlA <> OldVal(MyControlFieldA)
-if so issue KEYBOARD 'TAB' CLEAR to force the LostFocus event
In oForm.PageFrame.Page1.MyControlA.LostFocus
-test for change in MyControlA <> OldVal(MyControlFieldA)
-if so oForm.PageFrame.ActivePage=2
set all page2.AnyControl.Enabled = .F. except page2.MyControlB
oForm.PageFrame.Page2.MyControlB.SetFocus()
In oForm.PageFrame.Page2.MyControlB.LostFocus
-test for change in MyControlA <> OldVal(MyControlFieldA) ;
AND for nochange in MyControlB = OldVal(MyControlFieldB)
if so This.valid()
oForm.PageFrame.ActivePage=1
oForm.PageFrame.Page1.MyControlA.Value = OldVal(MyControlFieldA)
oForm.PageFrame.Page1.MyControlA.SetFocus()
In oForm.PageFrame.Page2.MyControlB.Valid
-test for change in MyControlA <> OldVal(MyControlFieldA) ;
AND for nochange in MyControlB = OldVal(MyControlFieldB)
if so MESSAGEBOX advising user that since a change wasn't made in MyControlB
we are resetting MyControlA to it's OLDVAL
and returning to oForm.PageFrame.Page1.MyControlA
Tested and working just like I wanted it to work.
Thanks again
Pierre Richard
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only