Date Format


Posted by BeverleyB on July 31, 2001 5:55 AM

I have 3 textboxes which i want to be formatted as dd/mm/yy. what i want is to have the text boxes appear on the form when the worksheet opens with the slashes already there. eg --/--/--. Is there any code that can help me achieve this? Also can anything be written into the code so that it when the user is entering the information it skips over the slashes? Any help would be appreciated?

Thanx

I posted this question already but i can't seem to find it anywhere.

Bev

Posted by Damon Ostrander on August 01, 2001 8:01 AM

Hi Bev,

What you describe can be done using a single textbox for each date with a little VBA, but why not instead just use three textboxes for each date--one for month, one for day, one for year? You could even put a (label) "/" between each textbox. You could have it automatically go to the day textbox when the user types in the second character in the month textbox, etc.

Damon

Posted by BeverleyB on August 02, 2001 10:02 AM

Hi Damon,
The problem is that each of these textboxes serve a different purpose.textbox1 is the date effective, textbox2 is the expirty date and textbox 3 is the date of birth of the client so i have to have these 3 boxes since these will be updated our system. Can you still offer any help?
Bev

Posted by Damon Ostrander on August 03, 2001 7:43 AM

Hi again Bev,

What I meant was that you could replace EACH of the three date textboxes with three textboxes: one each for month, date and year. There would be a total of 9 textboxes. The three textboxes for each date would be right next to one another, and you could put a text "/" label between them.

Damon



Posted by Damon Ostrander on August 03, 2001 2:32 PM

Beverley,

If you would like to post your email I would be happy to email you a little demo showing what I am talking about. It looks just like a single textbox, but is really three.

Damon