Solved

Code Source to extract Data

Posted on 2011-09-27
3
218 Views
Last Modified: 2012-06-22
In the process of buidling a database. I have a table called Oracle Extract which contains 2 different tasks. one is services the other are expenses ( Identified by the task column-1101.1 is an expense, 2205.1 is services.
I am creating a report to illustrate various data on the projects (Project Margin Report). I would like to have the total for task 1101.1 to show up in the Actual Expense Text box( Highlighted in Red on Project Margin Report) for each project. Looking for suggestions on the best way to pull this data into the report. Maybe something similiar to an if statement in excel. I tried to write it but cant seem to get it correct.
I have attached the database file

Account-Project-Management.accdb
0
Comment
Question by:SMP319
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 40

Accepted Solution

by:
als315 earned 500 total points
ID: 36715079
You can use this query for collecting expense and services in different columns:
 
SELECT [Oracle Extract].Project, [Oracle Extract].[Employee/Supplier], Sum(IIf([Task]=1011.1,[Oracle Extract]![Quantity],0)) AS ExpQnty, Sum(IIf([Task]=2205.1,[Oracle Extract]![Quantity],0)) AS ServQnty
FROM [Oracle Extract]
GROUP BY [Oracle Extract].Project, [Oracle Extract].[Employee/Supplier];

Open in new window

Change field if you like to sum other then quantity
0
 

Expert Comment

by:Ashrafedes
ID: 36716649
I did not get the problem , please more explainsion
0
 
LVL 1

Author Closing Comment

by:SMP319
ID: 36716894
Thanks for this. It got me around the problem i was having in trying to do seperate queries since the column header was being duplicated in the report. Thanks
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question