I have a date/time field on a form (default of @Today) that has no validation on it. If I then enter a word such as “none” in the date field and refresh the doc, it sets the date value back to the original value without giving an error message. I expected it to give me and invalid date time error becasue of the text value? Should it return an error message or is it functioning correctly? Any thoughts …
Subject: Date/Time Field Entry Issue
Put a validation test and any attendant error messages in the field validation event handler.
Subject: RE: Date/Time Field Entry Issue
Thanks … I have been doing that this am.
If I change the field value to “none” and hit F9, the field value is reset back to the orig date value in the Queryrecalc event. I set up a number of message boxes in the various events to see where this is getting reset. FYI … there is not any other code in any of the events.
Subject: My goal here is to …
add validation to a date field that requires a user to enter a valid date. The field is mandatory. I’d prefer to do this in the QuerySave event, but at this point I’d be OK with code in the field validation event.
Subject: RE: My goal here is to …
I beleive the problem is your default date is @Today.
Therefore the system seems to have the “smarts” if someone types in an invalid date it converts it back to the default which is today.
I assume the problem for you, is you don’t want it to default to todays date is someone enters a string?
I think the only work around is to remove the default.
Subject: RE: My goal here is to …
You are correct on both issues. I want to leave the invalid date for user to correct and the default date appears to be the issue. Thanks …
Subject: Date/Time Field Entry Issue
Never tried none but there are valid strings for dates such as:
Today
Yesterday
Tomorrow
So I’m guessing Lotus Notes is trying to figure out what “none,” see’s it’s invalid and uses the default.