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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Input Mask - Date

Status
Not open for further replies.

mastertorr

Programmer
Dec 21, 2006
36
0
0
CA
Is there a way to have a textbox with the input mask set to 99/99/0000, with the format set to mm/dd/yyyy, but allow the user to enter a partial date? such as just the day, just the day and month? When the textbox loses focus, it throws an error obviously..

but is there a way around this? Not my choice, but the functionality is required as the data being entered sometimes only has parital dates(missing the year for example) and the user has to be able to fill in the pieces of the date written in.

Thanks

 
How are ya mastertorr . . .

You appear to have the same problem I've answered in another thread. That is [blue]how to trap an Input Mask Error.[/blue]

See my post in thread702-1530965

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Thanks for the reply.
but I want to ignore the error do to the fact that partial dates can be entered.

I put the form_error "exit sub",on the lost focus event of the textbox in question, i placed "on error resume next", but the error message still pops up. Any thoughts?
 
Resolved myself. Just separated the date input into 3 separate textboxes (which i was trying to stay away from) but still works/same functionality)
 
It can also be noted that you can enter half a date ie dd/mm and access will sutomatically enter the current year.

Ian Mayor (UK)
Program Error
9 times out of 10 I know what I'm talking about. This must be my tenth reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top