Final goal is getting both parts below combined together. Round then perform the adding function. I have tried multiple options but I cannot figure them out. I have them broken down into both sections that work but I am not sure how to combine the logic.
Product_Table only contains two columns; both currently set as text
LIFE
INTERVAL
Thanks
1st part:
Take today's date, move to the next Monday: If day of week = Monday move to next Monday
*this line seems to accomplish this correctly*
DateAdd("d",8-Weekday(Date(),2),Date())
2nd part:
If INTERVAL equals = "days" add value of LIFE to date in total number of days;display mmddyy format
If INTERVAL equals = "months" add value of LIFE to date in total number of Months;display mmddyy format
*this line seems to accomplish this correctly*
SELECT Switch(
Product_Table.Interval="days",Format(DateAdd("d",P roduct_Table.[Life],Dat()),"mmddyy"),
Product_Table.Interval="months",UCase(Format(DateA dd("m",Product_Table.[Life],Date()),"mmddyy")),
1=1,"NO FORMAT")
AS XP_DATE, *
FROM Product_Table;
I cannot figure out how to combine the two procedures, thanks to any assistance or guidance provided. It won't let me upload my sample database.