Default Year in Date field

P

Paul

How do I set-up a DD/MM/YY date field so that I can put a default value in
for the Year ?
 
T

Tim Ferguson

(e-mail address removed)(Paul) wrote in
How do I set-up a DD/MM/YY date field so that I can put a default
value in for the Year ?

I'm afraid you are in the hands of Windows itself. If you type into any
standard control in Windows something like "25/12" it will be converted
into a date in the current year.

You will have to do some jiggery-pokery with the Text property but I have
a feeling that a control bound to a DateTime value will be coerced before
even the BeforeUpdate event has fired.

An alternative would be to pre-load the control with a suitable starting
date using the DefaultValue, so if it started out with 01/01/1999 the
user would only have to edit the first two parts.

Hope that helps


Tim F
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top