By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,761 Members | 1,878 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,761 IT Pros & Developers. It's quick & easy.

obtain actual year and month from fiscal year and month

P: 2
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.
Mar 22 '12 #1
Share this Question
Share on Google+
4 Replies


NeoPa
Expert Mod 15k+
P: 31,489
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.
Mar 22 '12 #2

Rabbit
Expert Mod 10K+
P: 12,366
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.
Mar 22 '12 #3

P: 2
Expand|Select|Wrap|Line Numbers
  1. Private Sub Receivables_Click()
  2. Dim InputX As Integer
  3. Dim InputZ As Integer
  4. Dim Fiscal_Year As Integer
  5.  Dim Fiscal_Month As Integer
  6.  
  7. If Fiscal_Month > 0 Then
  8.     If Fiscal_Month < 4 Then
  9.       InputX = Fiscal_Month + 9
  10.        InputZ = Fiscal_Year - 1
  11.     Else
  12.        InputX = Fiscal_Month - 3
  13.        InputZ = Fiscal_Year
  14.     End If
  15.     End If
  16. DoCmd.OpenReport "R3_Receivables", acViewPreview
  17. 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.
Mar 23 '12 #4

NeoPa
Expert Mod 15k+
P: 31,489
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 ;-)

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.
Mar 23 '12 #5

Post your reply

Sign in to post your reply or Sign up for a free account.