P
Patrick
HI!!
I'm presently working with fiscal years and need to find a
way(programmaticaly) to discern if a date entered
coresponds to the fiscal year that there working on.
Example:
Lets say I'm using the FY: 2003/2004, which in turn
coresponds to the following range: 03-apr-01 to 04-Mar-31.
When a date is entered I want to know if its inside the
range or outside of it! Any ideas on how to do that.
So far i've tried-it using a If statement, but I don't
think that I'm realy working with the right statement. It
works only some times..
Here's an example:
If sysDate >= rgDate1 And sysDate <= rgDate2 Then
' date presently entered his between the acceptable range
' of the current Fiscal Year.
MsgBox "Its ok!"
Else
' Flag user, that the date entered is outside the curent
' FY range.
MsgBox "WARNING!! " & vbNewLine & "The system notice
that : '" & sysDate & "' " _
& " " & vbNewLine & " is not a suitable delivery date,
because its not a part of the " _
& " " & vbNewLine & " following fiscal year : [ from '"
& rgDate1 & "' to '" & rgDate2 & "' ]. " _
& " " & vbNewLine & " THIS IS ONLY A REMINDER!, you can
still use this date or " & vbNewLine & " " _
& "change-it for another one, its up to you."
End If
CAN ANYONE HELP ME OUT!!!
thanx in advanced,
Pat..
I'm presently working with fiscal years and need to find a
way(programmaticaly) to discern if a date entered
coresponds to the fiscal year that there working on.
Example:
Lets say I'm using the FY: 2003/2004, which in turn
coresponds to the following range: 03-apr-01 to 04-Mar-31.
When a date is entered I want to know if its inside the
range or outside of it! Any ideas on how to do that.
So far i've tried-it using a If statement, but I don't
think that I'm realy working with the right statement. It
works only some times..
Here's an example:
If sysDate >= rgDate1 And sysDate <= rgDate2 Then
' date presently entered his between the acceptable range
' of the current Fiscal Year.
MsgBox "Its ok!"
Else
' Flag user, that the date entered is outside the curent
' FY range.
MsgBox "WARNING!! " & vbNewLine & "The system notice
that : '" & sysDate & "' " _
& " " & vbNewLine & " is not a suitable delivery date,
because its not a part of the " _
& " " & vbNewLine & " following fiscal year : [ from '"
& rgDate1 & "' to '" & rgDate2 & "' ]. " _
& " " & vbNewLine & " THIS IS ONLY A REMINDER!, you can
still use this date or " & vbNewLine & " " _
& "change-it for another one, its up to you."
End If
CAN ANYONE HELP ME OUT!!!
thanx in advanced,
Pat..