Calculated expiration dates based on a field with no of extensions

%3CLINGO-SUB%20id%3D%22lingo-sub-2106542%22%20slang%3D%22en-US%22%3ECalculated%20expiration%20dates%20based%20on%20a%20field%20with%20no%20of%20extensions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2106542%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3EI'm%20trying%20to%20calculate%20expiration%20dates%20based%20on%20an%20original%20expiration%20date%20then%20if%20it%20can%20be%20extended%20based%20on%20the%20number%20in%20a%20field%20use%20that%20number%20then%20it%20will%20add%20the%20amount%20of%20months%20in%20another%20field%20and%20add%20it%20to%20the%20original%20expiration%20date.%20Here%20is%20what%20i%20have%20so%20far%20that%20doesn't%20work%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3EExpiration%3A%20IIf(%5BTotal%20Shelf%20life%5D!%5Bno%20of%20Extensions%5D%3D1%2CDateAdd(%22m%22%2C%5Bextension%201%5D%2C%5Bshelf%20life%20exp%5D))%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3Emore%20info%3A%26nbsp%3Bthe%20original%20expiration%20date%20is%20(shelf%20Life%20Exp).%20I%20have%20a%20field%20that%20has%20the%20number%20of%20extensions(up%20to%203)%20and%20fields%20for%20the%20months%20that%20i%20can%20be%20extended%20for%20each%20extension.(18mo%20for%20first%2C12mo%20for%20second%2C%206mo%20for%20third%20extension).%20I%20need%20to%20take%20the%20shelf%20life%20expiration%20date%20and%20determine%20then%20number%20of%20extensions%20and%20the%20months%20those%20extensions%20are%20and%20come%20up%20with%20a%20new%20date%20for%20each%20expiration%20date.%20I%20have%20fields%20for%20each%20new%20date%20so%20I%20can%20do%20them%20one%20at%20a%20time.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2106542%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAccess%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

I'm trying to calculate expiration dates based on an original expiration date then if it can be extended based on the number in a field use that number then it will add the amount of months in another field and add it to the original expiration date. Here is what i have so far that doesn't work

Expiration: IIf([Total Shelf life]![no of Extensions]=1,DateAdd("m",[extension 1],[shelf life exp]))

 

more info: the original expiration date is (shelf Life Exp). I have a field that has the number of extensions(up to 3) and fields for the months that i can be extended for each extension.(18mo for first,12mo for second, 6mo for third extension). I need to take the shelf life expiration date and determine then number of extensions and the months those extensions are and come up with a new date for each expiration date. I have fields for each new date so I can do them one at a time.

1 Reply

@lite4d That could be:

Expiration: DateAdd("m", 6 * (3 - [no of Extensions]),[shelf life exp]))