Joel
calculating dates March 14, 2009 11:04PM |
DerekT
Re: calculating dates March 15, 2009 12:12PM |
PROCEDURE lpSetEndDate() dNewDate = edt_StartDate //Reset in case of unit change SWITCH CMB_MembershipDuration CASE 2: //Day nUnitsToAdd = CMB_MembershipUnits..DisplayedValue dNewDate..Day += nUnitsToAdd CASE 3: //Week nUnitsToAdd = Val(CMB_MembershipUnits..DisplayedValue) * 7 dNewDate..Day += nUnitsToAdd CASE 4: //Month nUnitsToAdd = CMB_MembershipUnits..DisplayedValue dNewDate..Month += nUnitsToAdd CASE 5: //Year nUnitsToAdd = CMB_MembershipUnits..DisplayedValue dNewDate..Year += nUnitsToAdd END edt_EndDate = dNewDate //Display calculated dateYou may need a similar Procedure called from the CMB_MembershipUnits in case the unit type is changed.
Joel
Re: calculating dates March 15, 2009 04:10PM |