With a text box on my form format = ShortDate and the code below
I get 12/30/1899
But if I change the Value Directly in the text box Default property
to =CDate("5/20/2006") it works
why am I getting the wrong date using the VBA code??
Newbie in search of knowledge
I get 12/30/1899
Code:
Private Sub Form_Load()
Forms!frmLogInOut!txtStartDate.DefaultValue = CDate("5/20/2006")
End Sub
But if I change the Value Directly in the text box Default property
to =CDate("5/20/2006") it works
why am I getting the wrong date using the VBA code??
Newbie in search of knowledge