Hi, I have this code for a field value in a query, which works well to add 35 days to the date specified and append it to a table.
Code:
Function AddSalesDays()
AddSalesDays = DateAdd("d", 35, "1/11/14")
'weekend results bumped to Monday:
Temp = Format(AddSalesDays, "ddd")
If Temp = "Sun" Then
AddSalesDays = AddSalesDays + 1
ElseIf Temp = "Sat" Then
AddSalesDays = AddSalesDays + 2
End If
End Function
However, rather than specifying the static "1/11/14" date, I want to reference an existing date field CI_CREATED DATE from table WC_CLIENT_ISSUE
But I don't know the syntax to accomplish this and was hoping someone here could assist. When I try the following, I get a type mismatch run-time error:
Code:
AddSalesDays = DateAdd("d", 35, "[WC_CLIENT_ISSUE].[CI_CREATED_DATE]")