G
Guest
I tried to use an answer to another discussion group question to come up with
this code:
Private Sub Form_Current()
Me.FirstResult = Me.ThirdDate - Me.SecondDate
Me.SecondResult = Me.ResponseDate - Me.ThirdDate
End Sub
Private Sub FourthDate_AfterUpdate()
Me.SecondResult = Me.ResponseDate - Me.ThirdDate
End Sub
Private Sub ResponseDate_AfterUpdate()
DateAdd("m", 3, #1/1/2006#) = DateAdd("m", 3, [ResponseDate])
End Sub
Private Sub ThirdDate_AfterUpdate()
Me.FirstResult = Me.ThirdDate - Me.SecondDate
End Sub
Fields:
FirstDate
SecondDate
ThirdDate
FirstResult (Number of Days Between FirstDate and SecondDate) (unbound)
ResponseDate (Calculated date =DateAdd("m",3,[ThirdDate]) (unbound)
**The due date is 3 months from ThirdDate**
FourthDate
SecondResult (Need number of days between the ResponseDate and the FourthDate)
I tried to follow the same pattern in creating the SecondResult, but I don't
think I should be putting this calculation in the CurrentForm with the
FirstResult? I guess this must have something to do with the ResponseDate
being a calculated date?
Can anybody help!?
this code:
Private Sub Form_Current()
Me.FirstResult = Me.ThirdDate - Me.SecondDate
Me.SecondResult = Me.ResponseDate - Me.ThirdDate
End Sub
Private Sub FourthDate_AfterUpdate()
Me.SecondResult = Me.ResponseDate - Me.ThirdDate
End Sub
Private Sub ResponseDate_AfterUpdate()
DateAdd("m", 3, #1/1/2006#) = DateAdd("m", 3, [ResponseDate])
End Sub
Private Sub ThirdDate_AfterUpdate()
Me.FirstResult = Me.ThirdDate - Me.SecondDate
End Sub
Fields:
FirstDate
SecondDate
ThirdDate
FirstResult (Number of Days Between FirstDate and SecondDate) (unbound)
ResponseDate (Calculated date =DateAdd("m",3,[ThirdDate]) (unbound)
**The due date is 3 months from ThirdDate**
FourthDate
SecondResult (Need number of days between the ResponseDate and the FourthDate)
I tried to follow the same pattern in creating the SecondResult, but I don't
think I should be putting this calculation in the CurrentForm with the
FirstResult? I guess this must have something to do with the ResponseDate
being a calculated date?
Can anybody help!?