I wouldn't use input masks on Date text boxes. In form's design view, double click on your text box for a date, on 'Format' tab's top line select 'Short/Long date'. If you change the date format to 'dd-mm-yy' in Window's control panel this enables a user to just type '17 2' and after control looses focus access converts it to '17-02-04'.
Thanks for your suggestion.
I try to use brianb99999's suggestion and seen OK, but the problem is that before I do not change the Windows setting Access converts input data to mm-dd-yy formatwhen the control looses focus .
The best way to input as dd-mm-yy is control by code, Right?
I can make some changes of the Windows on my system only.
So I should write some code to allow to input dd-mm-yy in the text box run on any system.
Pls. check this code for any correction or enhancement.
Public Function DateCvt(strDateText As String) As String
Dim flag As Integer
Dim intLength As Integer
Dim intSeparator As Integer
Dim strDD As String
Dim strMM As String
Dim strYY As String
intLength = Len(strDateText)
intSeparator = 0
For flag = 1 To intLength
If Mid(strDateText, flag, 1) <> "/" Then
Select Case intSeparator
strDD = strDD & Mid(strDateText, flag, 1)
strMM = strMM & Mid(strDateText, flag, 1)
strYY = strYY & Mid(strDateText, flag, 1)
Else: intSeparator = intSeparator + 1