How To Obtain A Table Summary Using QUERY Function?

Jun 21, 2007

Hi..(",o) anyone can HELP?

I'm currently using MS Access 2000...
May i know how can I translate the following TABLE

Doc# Team# Status
D1 TA Done
D1 TB WIP
D1 TC WIP
D1 TD Done
D2 TA Done
D2 TB Done
D2 TC Done
D2 TD WIP

to a QUERY reflecting in the following format?

TA TB TC TD
D1 Done WIP WIP Done
D2 Done Done Done WIP


Your help will be greatly appreciated!

View Replies


ADVERTISEMENT

Queries :: Create Summary Query For Each Table?

Dec 5, 2013

I have three tables with data.

Table1 is data for meals.
Table2 is data for room costs.
Table3 is data for payments made.

Each of these tables has a foreign key for EventID.I'm trying to produce a report that will show, for each EventID:

The total billed (which is meals + rooms)
The total paid (from Table3)
The balance due (the difference from the two above).

Do I have to create summary queries for each table?

View 2 Replies View Related

Queries :: Press A Button And Run A Macro / Append Query To Add A Single Summary Record To Another Table

Aug 2, 2013

I have a query run that gives me a list of records that I view on a continuos form. What I want is to press a button and run a macro/Append Query to add a Single Summary record to another table.

For example my query spits out this data

Part # Quantity Serial Number
GO2 1 123
GO2 2 456
GO2 2 789

What I'm looking to get is

Part Number Total Quantity Serial Number 1 Serial Number 2 ..
GO2 5 123 456

I'm stuck on a couple of things.

1. Getting a new single row to append.
2. Getting Serial Numbers from several records to save on to a single record.

View 4 Replies View Related

How To Create A Field To Calculate Value Which Obtain Value From Different Table

Jan 1, 2013

I'm trying to summarize the value from multiple fields in a table and the total value will be updated on a different table as per highlighted below (taken from Northwind Web Database).

View 3 Replies View Related

Query Results Summary?

Aug 29, 2006

I'm trying to build a database that will calculate the price of meals. I have a table 'ingredients' that has the ingredients, measurements and prices. As prices can change regularly I assumed that inividual recipes should be queries that calculate the total cost on the fly. My problem is that I regularly need to print out a summary of costings that includes total costs for each recipe.
From reading various posts I have formed the opinion that I REALLY shouldn't store calculated results in a table.
Is there another way to get my summary? Or will I have to resort to being an access pariah?:(

View 2 Replies View Related

SQL Query To Create Summary

Dec 11, 2006

Hi Guys!

It's me again.

From one of my tables, custinfo, i want to generate a summary of records. What I mean is I want to count the total number of records, count those who doesn't have address entries, count those who doesn't have credit records. So in presentation, I want to have this:

Field No Records With Records Total
Address 10 256 266
CreditREc 5 261 266

Is it possible?

Thanks!

View 3 Replies View Related

Query To Get Summary Results For Multiple Queries

Feb 27, 2006

Hi All,

I have a approximately 70 queries in my database. I would like to be able to run a query which would run all of the queries and output the number of records for each query. Ideally, these would then be written to a table so that the user could then just read the values from the table for the latest results, rathe r than have to execute the whole thing again.

The user may wish to select which queries to run. I was thinking that I would need a table as follows called say tblQueryResults:

QueryToRun - Yes/No - DateRun - NumberOfRecords
Query1 - Yes - -
Query2 - Yes - -
...
...
...
Query70 - Yes - -


So my first dilema is to work out how to run all the chosen queries that the user wishes to run. The user will probably have all 70 ticked as Yes initially.

Should I run this from VB code with a whole lot of VB statements. I would like to loop through the whole table and collect a list of all the queries to run based on a positive Yes for some or all of the queries. The results must then go and be written into the same table under the date it was run and the number of records that was found for each query.

The whole reason for doing this is that queries which return no records need not be run by the user - saving the user time etc. I appreciate that this query will take a considerable amount of time - given that it could be as many as 70 being run one after another.

Thanks,

Evan

View 2 Replies View Related

Reports :: How To Combine Queries Into A Summary Query Of Sorting

Mar 21, 2013

i intially, I wish to have attendance stats for 3 groups of people over 2 days in a report

i have the two queries for the raw data, but wish to combine into a report that will ultimately become a "dashboard" report for half a dozen queries., and can only get one or the other to work do i need to combine the queries into a summary query of sorts?

View 1 Replies View Related

Queries :: Counting Occurrences Of P - Summary Column In Crosstab Query

Feb 18, 2014

I need to add a column to a crosstab query that counts all of the occurrences of "P" in a particular row in the crosstab query. Basically "P" stands for "Present" and I need to know how many days each employee was present for his/her shift. The SQL for the crosstab query is as follows:

PARAMETERS [Forms]![frmDashboardReports]![txtStartDateAndTime] DateTime, [Forms]![frmDashboardReports]![txtEndDateAndTime] DateTime;
TRANSFORM First(tblAttendance.AttendanceCode) AS FirstOfAttendanceCode
SELECT tblAttendance.EmployeeName
FROM tblAttendance
WHERE (((tblAttendance.AttendanceDate)>=[Forms]![frmDashboardReports]![txtStartDateAndTime] And (tblAttendance.AttendanceDate)<=[Forms]![frmDashboardReports]![txtEndDateAndTime]))
GROUP BY tblAttendance.EmployeeName
PIVOT Format([AttendanceDate],"Short Date");

This returns an "AttendanceCode" against each employee against each day in the specified time period. I just need to be able to "sum" those codes in a column.

View 3 Replies View Related

Modules & VBA :: Construct A Query With Number Of DCounts For Summary Report

Dec 16, 2014

I am trying to construct a query with a number of DCounts for a summary report, and each of those counts is to have more than one criteria.So far, the code below is an example of the code, which returns #Error in five rows

Code:
DCount("[ID]","Attendance","[Absent]= True & " And [Date]=" Between [Forms]![DateSelect]![txtStartDate] And [Forms]![DateSelect]![txtEndDate]")

I have a feeling that it is the criteria for the date that I have got wrong, but I cannot see the wood for the trees at the moment.If it makes any difference, all of the DCounts will refer to one table and will all be within the same date range.

View 11 Replies View Related

Can Not Obtain Certain Field

Mar 5, 2008

I built a form that feeds data to tblOrders. In this form I have a button "Send", that must send a message to person from tblPersons.
I have a problem to get an "email" from tblPersons.
Any assistance will kindly appreciated.

Code:

Private Sub btnSend_Click()
Dim mess_body As String
Dim appOutLook As Outlook.Application
Dim MailOutLook As Outlook.MailItem

Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)

mess_body = "Dear " & PersonID & "," & vbCrLf & vbCrLf

With MailOutLook
.To = PersonID ' <-- here
.Subject = "Order Accepted"
.Display
End With
End Sub


Attached also tables relationships.

View 3 Replies View Related

How To Obtain Data?

Jul 3, 2007

Hello, I am having problems with one of my forms.
I use a very simple database (4tables), basically I have a table for customers, and a table for sales. When I want to enter a new sale, I have to input the customer's ID and the total amount for the sale. But since I can't memorize all of the custemer's IDs, i have to go and manually check the customer table to get their ID.

What I want to do is to get the customer ID from the same form I use to enter the sale, by just typing the customer's name.

How can I do this? thanks!!

View 1 Replies View Related

Queries :: Replace Function In Query With Sub Table

Feb 14, 2014

I am running a query for an apparel manufacturing facility. In my query I have a table called 'OrderForm' which is where the orders are put in. There are more than one type of fabric that can be a part of an apparel item, so as a result, there are multiple fields pulling from the 'FabricType' table. In order to get this to work in my query I created 'SubTables' for the different fabric fields. For example, I have tblFrontfab, tblbackfab, tblsleevefab, and tblcollarfab which are just extra copies of the 'FabricType' table. The actual question is that when I want to replace characters like ,./& in the fabric field but I can't use the replace function. It says that it is too complex to calculate.

I used this notation
Frontfab: Replace([tblFrontfab].[fabric],".","")
and the error was that it is to complex to evaluate.

View 1 Replies View Related

Forms :: Obtain Record Value From Datasheet Subform

Dec 23, 2013

How can I obtain the value of a record from my subform in datasheet view?

Ideally I could double click in the "cell", for lack of a better word, and grab that value to pass through to another function.

On double click event? What then?

Edit: I suppose the user could select the row that the value is in as well. As long as I could then find the field I need from within the row. That might make things easier.

Edit 2: Sometimes I post before doing proper research. I've figured it out. Here is a quick example. The below code references an unbound subform called "Main_AU" where the field I want is "Description". The MsgBox is used to confirm that the code is grabbing what I want it to.

Code:
Dim test As String
test = Main_AU!Description
MsgBox test

View 3 Replies View Related

Queries :: Obtain Field Info When Return Is Used

Feb 7, 2014

I'm trying to obtain all of the information in a text field for a query.

The user entered information and used a return (enter key) to enter information on a new line within the same field. The information after the return is not captured in the field in the query. Is there anyway I can capture all of this info?

View 3 Replies View Related

How To Obtain Date Type Without Time Attached

Feb 3, 2015

I have a field [CurrentDay] of type Date/Time. The values for this field are entered through the selection from the date picker. However the time of the day always come along with the date - even if it is not seen. This creates a huge problem when making a query based on this field because no results will be returned unless the time is included with the date in the criteria.

The other part to the problem is that I cannot find a built in function in the expression builder to generate the current date without appending the time - now() certainly does not do that - even if the time is not seen it is there.

View 3 Replies View Related

Obtain Hierarchy Reports (direct And Indirect)

Jun 10, 2014

Any way to obtain all individuals that report to a particular person (directly or indirectly) through a query. A sample of the table is below:

tbl_Hierarchy
Enumber
FName
Mngr_Enumber

E111
John
E000

E222
Mary
E111

E333
Paul
E111

E444
Sarah
E999

E555
Sam
E333

E666
Tom
E111

E777
Karen
E111

E888
Jim
E666

E999
Deb
E666

For example I would like to see everyone who reports through Tom(E666). The result should yield:

E888
Jim
E111

E999
Deb
E666

E444
Sarah
E999

View 3 Replies View Related

Modules & VBA :: Creating A Function That Counts Records And Use That Function In A Query

Dec 11, 2013

So basically I need making a function that will count the number of records from another table/query based on a field from the current query.

View 2 Replies View Related

General :: Obtain Totals From Two Columns In List Box Into Text Boxes On Main Form

Oct 27, 2012

I am trying to obtain totals from two columns in the list box into text boxes on the main form, but my third argument is not working as expected.The source of one of the tex boxes is:

Code:
=DSum("Airtickets","T_Training_Participants.ProgrammeID=Me.lstParticipants")

I want to sum only amounts of the records that equal or belong to a selected programme (ProgrammeID) in the bigger list box above.

View 2 Replies View Related

Counting Summary

May 16, 2005

hi
i have a number of query's (Current memberships, out of date memberships etc) all via a certain area/town.

i am trying to find out total figures (how many members how many non members, how many in certain area/town. these need to be updated continuoulsy.

do not no how to approach i ahve looked at the sigma sign and played with no luck.

should i be looking at another query for totaling or un update qurey, sorry very lost, would like this information also displayed on my record form.

searched all weekend with no luck any ideas.

View 2 Replies View Related

Summary Of 5 Marks - MIN And MAX

Feb 25, 2012

I try to make my second database in Access. I need to summary 5 numbers, and then minus the lowest and the highest of them. For example (1+2+3+4+5)-1-5=9

In excel it looks like this: =SUM(C2:G2)-MAX(C2:G2)-MIN(C2:G2)

In access (Expression builder) i made this code: [J1]+[J2]+[J3]+[J4]+[J5] - it's the summary of five marks, but how can i erase the highest and the lowest one?

View 3 Replies View Related

Time Summary Question

Feb 14, 2006

I am looking for the best way to produce a form and/or report that will count how many appointments are scheduled by every tenth of an hour for every hour. Here is what I have for an expression in a query for 1:07 PM - 1:13 PM:

7-13Start: (IIf([Startminute]="7" And [StartHour]="13",1,0)+IIf([Startminute]="8" And [StartHour]="13",1,0)+IIf([Startminute]="9" And [StartHour]="13",1,0)+IIf([Startminute]="10" And [StartHour]="13",1,0)+IIf([Startminute]="11" And [StartHour]="13",1,0)+IIf([Startminute]="12" And [StartHour]="13",1,0))

This works but will take the 288 expressions to get what I need because the requirement is to show schedule start AND schedule end numbers. I am getting tunnel vision and would like to know if anyone has any better ideas.


Thanks,
Rich

View 1 Replies View Related

SQL For Financial Summary From Transactions

Oct 20, 2005

I am working on a financial integration system that receives lists of financial journal transactions from several accounting packages.

I import and sumarise the transactions and end up with a transactions table like the one below. I now want to produce an Accounts summary (by period) table. I am trying to figure out how to do this just using SQL.

I do not want to use record by record VB because it is slow and I have a million+ records.

Can anybody help ?

Transactions Table (input)

Account Period Amount
1011100
1015 100


Account Summary (desired output)

Account Period Opening Movement Closing
101 10100100
10121000100
10131000100
10141000100
1015100100200

PS I need to run on Access and SQL Server

View 1 Replies View Related

Creating Summary Of Data

Dec 19, 2006

I have the detail data in a query working fine in MSAccess 2000 sp3 and I'm trying to create a summary of the data. My query is as follows:

SELECT CUH.CULevel, CUH.AREA, TYPES.Asset, Count(TYPES.Asset) AS Counts
FROM (TYPES LEFT JOIN Broker ON TYPES.[Owner/LastLogin] = Broker.LOGIN_ID) LEFT JOIN CUH ON Broker.COSTUNIT = CUH.COST_UNIT
WHERE (((TYPES.Asset) In ("T30", "DESKTOP")))
GROUP BY CUH.CULevel, CUH.AREA, TYPES.Asset;

with the output like:

CULevelAREA AssetCounts
11000Disease AreasDESKTOP121
11000Disease AreasT3036

but I'm trying to get the output like:
CULevelAREAT30Counts Desktop Count
11000Area136 121

I'm pretty new in MSAccess and I've tried a number of things, but this is the closest I've gotten. Any help from anyone would be greatly appreciated!

View 4 Replies View Related

Help Creating A Summary Report

Aug 23, 2004

Lets say I have table with the following information:

OrderNo. ProductId Count1 Count2
01 AA 2 0
01 AB 0 1
01 AC 1 0
01 AD 0 3
02 AD 0 2
02 AE 4 0
02 AB 0 1
.
.
.

A count in Count1 means 0 in Count2 and vice-versa

How do I create a report that looks like this:

OrdeeNo. SumCount1/SumCount2
01 (3) / (4)
02 (4) / (1)
.
.
---------------------------
Totals (7) / (5)


Thank you

View 1 Replies View Related

Weekly Summary Of Tasks

Sep 17, 2007

I am just starting to use Access and have set up many simple forms, datasheets, reports, summaries, etc. I have not worked with macros, etc. and need help for this project. I have set up a task table

F1 - DateOfCall - date - now()
F2 - Client - text
F3 - DateCompleted - date
F4 - DueDate - date
F5 - problemDescription - memo
F6 - Resolution - memo

I need to run a query and/or report every week summarizing what has been done the past week. Would also like to view previous weeks. I need help. How do I go about doing this.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved