Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Field Help on Forms

Status
Not open for further replies.

blackte

Programmer
Jul 24, 2001
80
US
I have multiple forms that have dates on them. Each form is populated via a query from a table. All dates are Format = Short Date, Input Mask = 99/99/9999;0;_. My problem is that once a date is keyed into the date field, if it was a keying mistake you can not clear out that field because of the edit error about the input mask and being numeric. I have changed to a text field, but that does not seem to help either. I need to be able to clear a date field at anytime, and also be able to determine if the date field is null. Any help with this or ideas on how to resolve this problem would be greatly appreciated. Thanks in advance for any help.


Travis
 
You needn't use an input mask if you'll define the control's format as Short Date in the control's Format property. To inusre a value is entered for a control set it's Required property to Yes. It is often better for your users if you trap these "errors" yourself as the built-in Access error codes can be cryptic at times. By eliminating the input mask you'll find that correcting editing errors magically becomes much simpler as you can merely backspace over your errors.
 
based on your input mask you want to have leading zeros in the month and day. aswell as a full year. do you do any validating on the entry such Month >=01 and <13. fro the Day >=01 and <32. By doing this you will catch all invadil months and days. You can do the same for Year if you want.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top