Solved

Code Source to extract Data

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
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…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

617 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