Information générale
Catégorie:
Codage, syntaxe et commandes
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
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement