All i want is to control the format of the data input to a text box, ie; Date = dd/mm/yy, Time = 00:00, Reference = (maximum 6 digits, numbers only), Post code = #### ###.
Any ideas why the below keeps bringing up my msgbox?
Any ideas why the below keeps bringing up my msgbox?
Code:
If Me.TextBoxDate.Value <> Format(Date, "DD/MM/YY") Then
MsgBox "Please enter Date in DD/MM/YY format."
Me.TextBoxDate.SetFocus
Me.TextBoxDate.Value = ""
Exit Sub
End If