Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Hi Nadya,
I also am using a highlighted grid. Marsha's code that you referred me to did indeed work when I used a message box to display an error and it worked even if I forced the grid to stay on the record in error.
The problem that I had with my code as well as Marsha's code was acually being caused by opening a modal form from the validation procedure. This action, for some reason caused recursive calls to the grid.AfterRowColChange event on return from the modal form.
I did however finally solve this by setting the new property .nRec2Validate = 0 in the .AfterRowColChange event as soon as the validation method had completed. I suspect it had something to do with the behaviour of the grid which seemed to re-execute the .BeforeRowColChange and .AfterRowColChange event on regaining focus. At least that is what it looked like to me. Set step on even made the recursive calls to these methods even worse.
The lines in the .AfterRowColChange event :
IF .nRec2Validate = 0
return
endif
has prevented the recursive running of my validation method.
In any event, This solved my current problem and I thank you for your kind assistance.
Elmer
Précédent
Suivant
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