In the Command Button Click event you could use
However you should try to avoid allowing users to enter text for stuff like dates which require a strict format. Instead use one of the many calendar forms you'll find if you google around, or keep it simple and have three listboxes to contain the numbers 1-31, 1-12 and 2016-whatever year is necessary. Then use the numbers selected in the list boxes to create the date. The days listbox could be made to react to the number of days in the month if you force the month listbox to be the first to be colmpleted.
Bookmarks