Gentlemen--
I have this formula calculating the last day of the month for a given date...the given date is determined by a table of incrementing values substracting months off the current date (IE, for today I would receive 12 dates-- 11/30/2005, 10/31/2005...12/31/2004).
RSLTDAY: IIf([RSLTMONTH] In (1,3,5,7,8,10,12,0,-2,-4,-5,-7,-9,-11),"/31/",
(IIf([RSLTMONTH] In (4,6,9,11,-1,-3,-6,-8),"/30/",(IIf(Right(CStr(Date()),4)<>"2008","/28/","/29/")))))
For some reason, if the date meets the first set of criteria, I receive an output of #Error in Datasheet View for those records, but all values fitting into the remaining criteria categories print fine...
...but what makes it even stranger is that if I change the /31/ to /15/ (or any other number) it all returns just fine-- its as if Access believes there is no month with 31 days in it!
Ideas??
I have this formula calculating the last day of the month for a given date...the given date is determined by a table of incrementing values substracting months off the current date (IE, for today I would receive 12 dates-- 11/30/2005, 10/31/2005...12/31/2004).
RSLTDAY: IIf([RSLTMONTH] In (1,3,5,7,8,10,12,0,-2,-4,-5,-7,-9,-11),"/31/",
(IIf([RSLTMONTH] In (4,6,9,11,-1,-3,-6,-8),"/30/",(IIf(Right(CStr(Date()),4)<>"2008","/28/","/29/")))))
For some reason, if the date meets the first set of criteria, I receive an output of #Error in Datasheet View for those records, but all values fitting into the remaining criteria categories print fine...
...but what makes it even stranger is that if I change the /31/ to /15/ (or any other number) it all returns just fine-- its as if Access believes there is no month with 31 days in it!
Ideas??