Hey guys,
I have the attached form:
That date without a label is set via VBA if the Salesperson is selected as "House Sales" (it is set to "" if any other salesperson is selected). That part works fine. I use the following code to accomplish this:
Code:
Private Sub SlspSelect_AfterUpdate()
Const cQuote = """"
Me.SlspSelect.DefaultValue = cQuote & Me.SlspSelect.Value & cQuote
Me.EmpCode = Me.SlspSelect.Column(3)
Me.EmpCode.DefaultValue = cQuote & Me.EmpCode.Value & cQuote
If Me.SlspSelect.Value = "House Sales" Then
Me.EorL.Value = 1
Me.EorL.DefaultValue = 1
Me.NextMailed = Forms![View Records]![NextAdDate]
Me.NextMailed.DefaultValue = Forms![View Records]![NextAdDate]
Else
Me.EorL.Value = 2
Me.EorL.DefaultValue = 2
Me.NextMailed = ""
Me.NextMailed.DefaultValue = ""
End If
End Sub
After a user types in the desired data, and hits the tab key in the final field a new record starts, except the date value changes to 12/30/1899. What am I doing wrong here?
I have NextMailed formatted as a short date, as well as Forms![View Records]![NextAdDate].