Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Code Source to extract Data

Posted on 2011-09-27
3
Medium Priority
?
223 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
3 Comments
 
LVL 40

Accepted Solution

by:
als315 earned 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

916 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