I am a new user of Access. I am not sure this is a right question.
Assume I have two tabels
Jan Feb Mar Apr May Jun
Table 1 Budget 98 98 56 45 879 99
Jan Feb Mar Apr May Jun
Table2 Actual 89 89 95 54 879 89
I want to set up a query. in the query, I will use budget number only if
actual is not available, once the actual number is available, I will replace
with actuals.
For example, if January actual is available, I will replace budget(98) with
actual (89).
Query Jan Feb Mar Apr May Jun Total
Actual Actual Budget Budget Budget Budget
(If avaible) (If avaible)
My problem is I have to change the total operations every time when I change
the column heading of the query.
thanks for your help.
James A. Fortune - 22 May 2008 05:33 GMT
> I am a new user of Access. I am not sure this is a right question.
> Assume I have two tabels
[quoted text clipped - 19 lines]
>
> thanks for your help.
Maybe:
tblBudgetActual
BAID AutoNumber
Period Date/Time Format: mmm yy
Budget Integer
Actual Integer
BAID Period Budget Actual
1 Jan 08 98 89
2 Feb 08 98 89
3 Mar 08 56 95
4 Apr 08 45 54
5 May 08 879 879
6 Jun 08 99 89
SQL View:
SELECT Period, IIf(Actual IS NULL, Budget, Actual) As BestGuess FROM
tblBudgetActual ORDER BY Period;
James A. Fortune
MPAPoster@FortuneJames.com
Eastar - 22 May 2008 19:48 GMT
James,
Thank you so much. I do not understand the code you wrote down yet. Bit I
think that will solve the problem.
thanks,
> > I am a new user of Access. I am not sure this is a right question.
> > Assume I have two tabels
[quoted text clipped - 42 lines]
> James A. Fortune
> MPAPoster@FortuneJames.com