Information générale
Catégorie:
Codage, syntaxe et commandes
>Hi,
>
>This should be easy. I have a textbox with the control source a datetime field in a remote view. If I put in the incorrect date,(date ansi, century on) "1998.55.55", the entire textbox is selected but I can't leave the textbox.
>
>This is good, however I want to send a message to the user to saying that the month or day portion is incorrect. I tried putting code in the valid event, but the messagebox didn't show up.
>
>if not between(val(substr(dtoc(this.value),6,2)),1,12)
> = messagebox("Incorrect month. Re-enter date.",16)
> return .f.
>endif
>
>
>Any ideas.
>
>Thanks in advance.
>
>Paul
If that SET NOTIFY doesn't help, you could unbind the control. Then VFP doesn't know it's supposed to be a date and you can put your own error checking.
-Michelle
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