ppoindexter
Registered User.
- Local time
- Yesterday, 21:47
- Joined
- Dec 28, 2000
- Messages
- 134
Can anyone add 3 more case select statements to this code so users can select "Fiscal Year" as an option? Specifically take Case 610, Case 620 and Case 630 modify it so its the fiscal year dates and not calander dates.
Case 6 'Year to Date
txtStartDate = DateSerial(Year(Date), 1, 1)
txtEndDate = Date
Case 600 'Current Year
txtStartDate = DateSerial(Year(Date), 1, 1)
txtEndDate = DateSerial(Year(Date), 12, 31)
Case 610 'Last 12 Months
txtStartDate = DateSerial(Year(Date) - 1, Month(Date), Day(Date) + 1)
txtEndDate = Date
Case 620 'Last Year txtStartDate = DateSerial(Year(Date) - 1, 1, 1)
txtEndDate = DateSerial(Year(Date) - 1, 12, 31)
Case 630 'Year Before Last
txtStartDate = DateSerial(Year(Date) - 2, 1, 1)
txtEndDate = DateSerial(Year(Date) - 2, 12, 31)
Case Else
txtEndDate = " Missing Case! "
End Select
End Function
thanks in advance
Case 6 'Year to Date
txtStartDate = DateSerial(Year(Date), 1, 1)
txtEndDate = Date
Case 600 'Current Year
txtStartDate = DateSerial(Year(Date), 1, 1)
txtEndDate = DateSerial(Year(Date), 12, 31)
Case 610 'Last 12 Months
txtStartDate = DateSerial(Year(Date) - 1, Month(Date), Day(Date) + 1)
txtEndDate = Date
Case 620 'Last Year txtStartDate = DateSerial(Year(Date) - 1, 1, 1)
txtEndDate = DateSerial(Year(Date) - 1, 12, 31)
Case 630 'Year Before Last
txtStartDate = DateSerial(Year(Date) - 2, 1, 1)
txtEndDate = DateSerial(Year(Date) - 2, 12, 31)
Case Else
txtEndDate = " Missing Case! "
End Select
End Function
thanks in advance