0
Answer

SQL access fiscal where clause query

David Smith

David Smith

12y
862
1

Can some  write the logic below in a simpler way Using Access SQL query

    If Month(Now()) < 7 Then
        TempYear = Year(Now()) - 1
    Else
        TempYear = Year(Now())
    End If
    FiscalYearStart = "7/1/" & TempYear
    FiscalYearEnd = "6/30/" & (TempYear + 1)
    StrFilter = StrFilter & "ServiceDateStart >= #" & FiscalYearStart & "# AND ServiceDateStart <= #" & FiscalYearEnd & "#"