I am trying to create an if then statement in access, but have more than two conditions I want returned. Below is my pseudo code:
IF Product_Date is >= 6/1/2009 and <= 5/31/2010 THEN
Product_Year = "2010"
ELSE IF Product_Date is >= 6/1/2010 and <= 5/31/2011 THEN
Product_Year = "2011"
ELSE IF Product_Date is >= 6/1/2011 and <= 5/31/2012 THEN
Product_Year = "2012"
END IF
In access, I can only create two of these conditions:
How can I incorporate more conditions into this code?
Thank you!
IF Product_Date is >= 6/1/2009 and <= 5/31/2010 THEN
Product_Year = "2010"
ELSE IF Product_Date is >= 6/1/2010 and <= 5/31/2011 THEN
Product_Year = "2011"
ELSE IF Product_Date is >= 6/1/2011 and <= 5/31/2012 THEN
Product_Year = "2012"
END IF
In access, I can only create two of these conditions:
Code:
IIf([Product_Date]>=#6/1/2009# And [Product_Date]<=#05/31/2010#,"2010","2011")
Thank you!