Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>I will not be able to validate the entry at all if the user did not enter anything. Example, checking for the field not empty() will not work.
>
>Any ideas??
DO CASE
CASE GETFLDSTATE("CurrentFld")=1
=MESSAGEBOX("Field has not been edited or deletion status has not chnged.")
CASE GETFLDSTATE("CurrentFld")=2
=MESSAGEBOX(Field has been edited or deletion status has changed.")
CASE GETFLDSTATE("CurrentFld")=3
=MESSAGEBOX("This means New and Empty")
CASE GETFLDSTATE("CurrentFld")=4
=MESSAGEBOX("Field in an appended record has been edited or deletion status has changed for the appended record.")
ENDCASE &&(from VFP Help)
So "If the user did not enter anything", the return value of GETFLDSTATE is 1 or 3.
>
>Also, I've noticed that when I append blank from the grid, sometimes it replace the new field value with the previous record value instead of blank. Any penny for thought ???
I'm not sure why but I think it's better update or revert table after validate the entered value.
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