I have a table with a field name called reture date and the default value is:
=DateAdd("d",21,Date())
In my form when you select Daily from the Combo box, I want return date to equal current date + 21 ( I have this part working)
If you select monthly, I want the return date to add 1 month and if you select yearly, I want the year to go up 1...
Any ideas??
This is what I have so far for the code:
Private Sub Combo67_Change()
If [Session 1 Name] = 1 Then
Me.[Return Date] = DateAdd("d", 21, Date)
End If
If [Session 1 Name] = 2 Then
Me.[Return Date] = DateAdd("d", 365, Date)
End If
If [Session 1 Name] = 3 Then
Me.[Return Date] = DateAdd("d", 2555, Date)
End If
End Sub
=DateAdd("d",21,Date())
In my form when you select Daily from the Combo box, I want return date to equal current date + 21 ( I have this part working)
If you select monthly, I want the return date to add 1 month and if you select yearly, I want the year to go up 1...
Any ideas??
This is what I have so far for the code:
Private Sub Combo67_Change()
If [Session 1 Name] = 1 Then
Me.[Return Date] = DateAdd("d", 21, Date)
End If
If [Session 1 Name] = 2 Then
Me.[Return Date] = DateAdd("d", 365, Date)
End If
If [Session 1 Name] = 3 Then
Me.[Return Date] = DateAdd("d", 2555, Date)
End If
End Sub