obtain actual year and month from fiscal year and month

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kashish sinha
    New Member
    • Mar 2012
    • 2

    obtain actual year and month from fiscal year and month

    have four forms namely file status , load file, reconciliation, and reports.

    Reconciliation form has 2list boxes.. namely fiscal year and fiscal month. In that we have to choose for eg say i chose fiscal year 2012 and month as 1, then when i click open the reports form i have reports in there which displays information as per the year and the month.

    what my requirement is in this report it displays fiscal year as i have chosen in the first step. But i do not want it because fiscal year 2012 and fiscal month 1 actually corresponds to actual year 2011 and month 10 i . e October. i want this to be displayed over there.
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32648

    #2
    I'm not sure how you allowed yourself to post this question without it, but you left out the correlation between fiscal year and actual year, so nothing makes any sense of course.

    Comment

    • Rabbit
      Recognized Expert MVP
      • Jan 2007
      • 12517

      #3
      Write an expression where if the fiscal month is 3 or less, it subtracts one from the year and adds nine to the month. Otherwise, it keeps the year and subtracts three from the month.

      Comment

      • kashish sinha
        New Member
        • Mar 2012
        • 2

        #4
        Code:
        Private Sub Receivables_Click()
        Dim InputX As Integer
        Dim InputZ As Integer
        Dim Fiscal_Year As Integer
         Dim Fiscal_Month As Integer
        
        If Fiscal_Month > 0 Then
            If Fiscal_Month < 4 Then
              InputX = Fiscal_Month + 9
               InputZ = Fiscal_Year - 1
            Else
               InputX = Fiscal_Month - 3
               InputZ = Fiscal_Year
            End If
            End If
        DoCmd.OpenReport "R3_Receivables", acViewPreview
        End Sub
        this i provided but not getting the answer i am gettin errors.

        i have given the correlation clearly that if its fiscal year 2012 n month 1 then it corresponds to actual year 2011 and month 10. probably you didnt read the whole thing.
        Last edited by NeoPa; Mar 23 '12, 12:20 PM. Reason: Added mandatory [CODE] tags for you

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32648

          #5
          Originally posted by Kashish
          Kashish:
          i have given the correlation clearly ...
          The only thing you have made clear is that thinking is not one of your strengths.

          A single example, without an explanation, is not only inadequate because examples are supposed to illustrate explanations, not take their place, but also because that leaves me to assume that you may want you fiscal months to match Gregorian calendar months as far as start and end dates go. I don't know what country you come from and I'm frankly not stupid enough to make that assumption because you can't be bothered to write the question properly. A clear question includes an explanation of your situation, not simply a loosely-worded sentence or two that relies on the reader to work out what the question should have been if it were done properly. The same is true for posting code samples. They can help illustrate a question, but they do not, in themselves, make a question.

          Did I mention that showing attitude to those who offer their free time to try to help you doesn't illustrate great strength in the thinking department either? You might want to try exercising that part before posting next ;-)

          Originally posted by Kashish
          Kashish:
          this i provided but not getting the answer i am gettin errors.
          And the error is? On which line? Please read Before Posting (VBA or SQL) Code as you seem to think it is our job to try to work out what you are having trouble with as well as to help you fix it.
          Last edited by NeoPa; Mar 23 '12, 12:24 PM. Reason: Added extra quote when I found more work required, caused by this member.

          Comment

          Working...