Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / May 2008

Tip: Looking for answers? Try searching our database.

Query -Change Column Headings each time

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Eastar - 21 May 2008 00:44 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.