On Mon, 3 Sep 2001 00:34:06 -0700, "Dave"
Quote:
>Hi
>Can you help me with the above.
>I am trying to add an inputmask for date entry to a text
>box. How do I do it????
>Thanks
>Dave
You cant do this with a TextBox. you can with MaskedEditBox.
"???, ## ,####" will do it.
This forces the user to enter Sep, 03 2001, with the commas inserted
automatically.
However, if there is any chance of your programme being used outside
the USA/Canada, I would not recommend this method.
Better to allow the user to input the date into a plain text box in
whatever way they choose. Then in the lost focus event put the
following:
If IsDate(text1.text) then
Format(Text1.text,"short date")
else
msgbox"Invalid Date"
end if
This will format the date according to the users local settings.
Stuart Sutherland