View Single Post
  #4  
Old April 14th, 2010, 10:35 PM posted to microsoft.public.access.gettingstarted
John... Visio MVP
external usenet poster
 
Posts: 900
Default Help with Function: date range

"Bre-x" wrote in message
...
Public Function my_dates(the_date As Date) As Integer

Select Case the_date
Case Between "07/31/2005" And "08/01/2006"
my_dates = 2006
case Between "07/31/2006" And "08/01/2007"
my_dates = 2006
Case Else
my_date = 0
End Select

End Function

If try to use # i get the same error

Help!!

Thank you
Bre-x



Or you could simplify it to something like
my_Date = Year(DateAdd("d", 153, the_Date))


John... Visio MVP