Solved

Code Source to extract Data

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

726 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