Solved

Code Source to extract Data

Posted on 2011-09-27
3
213 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 39

Accepted Solution

by:
als315 earned 500 total points
Comment Utility
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
Comment Utility
I did not get the problem , please more explainsion
0
 
LVL 1

Author Closing Comment

by:SMP319
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
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 …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now