General information
Category:
Coding, syntax & commands
>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
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