Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date Validation
Message
 
To
11/12/2000 14:16:14
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00451746
Message ID:
00452018
Views:
20
Randy,
Are you returning 0 or 1 from the valid() code? If so you will not get an 'invalid data' message, you'll have to add your own message. The following is from the Help text:

For example, if you have a text box that allows a user to type an appointment date, you could check to make sure that the date is not already past by including the following code in the Valid event of the text box:
IF CTOD(THIS.Value) < DATE( )
   = MESSAGEBOX("You need to enter a future date",1)
   RETURN 0
ENDIF
HTH
Barbara


>We are getting a situation where a form containing a date field appears to lock up when your try to leave the field with an invalid date. We searched our code for SET NOTIFY and found no instances. Having seen the "Invalid Date - press SPACE" message a long time ago, I verified that pressing space does indeed unlock the field and allow you to fix the date, but this is a **hideous** user interface even with the message on the screen, and it isn't showing on the screen at all. Does anybody know of other SET commands or form properties that can cause this annoying situation? The other features of date fields are very much desired if we can just figure out how to give the user an acceptable notification of an invalid date.
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform