Originally Posted by
ShennyP
I managed to get it to work with this
Private Sub Production_Date_AfterUpdate()
If Not IsNull(Me.Production_Date.Value) Then
Production_Date.DefaultValue = "#" & Me.Production_Date & "#"
End If
End Sub
However for some reason the month and day switch on me when it loads the default value. So ive put in 1st of march and hit next record and it goes to the 3rd of Jan. Any thoughts?
You have to use US format (m/d/yyyy) when you insert a date through VBA code.
Give it a try as below:
Code:
If Not IsNull(Me.Production_Date.Value) Then
Production_Date.DefaultValue = "#" & month(Me.Production_Date) & "/" & day(Me.Production_Date) & "/" & year(Me.Production_Date) & "#"
End If