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 Replies


ADVERTISEMENT

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

Queries :: Query With Multiple Results

Jun 20, 2013

I have an access database which is going to present a front end webpage form. The form has several drop down lists and I need one of those drop down list to display only certain results dependent on what the previous drop down list has selected e.g. if Box A is selected as Aces then I need the next drop down box to only display A building

1-A building
2 A building
3 and not the entire list.

How can i get this to work?

View 2 Replies View Related

General :: Summary Form / Home Page - Text Boxes Values From Multiple Queries

Jan 20, 2014

I am currently developing a database to provide a friend with an auction tracking and ordering system.

I will have a number of questions the first is related to the Home Page/Dashboard/Summary form I am creating. I basically have a few sections, one of which is a combo box offering the user to select an auction to view in the summary section. This summary section contains the list of lots but I also hope to to expand on this and create multiple text boxes, each containing the answer to a number of queries (totals etc).

I have written all the queries and can see the results however as the form does not have a record source I would like to know how to make each text box populate with the result of different queries (ideally in vb - I am using ms access 2010)?

I have tried a few things, control source doesn't apply as I have no record source (i guess). I investigated Dlookup/Dcount but am unsure if these apply for the same reason. I understand I am likely to need a recordset etc in vb and have already tried a few things but unfortunately none of them work.

View 1 Replies View Related

Queries :: Multiple Tables In Database - Inverting Results Of Select Query

Feb 5, 2015

I have a question where I need to effectively invert the results of a select query.

I have multiple tables in the database, but the 2 I'm looking at are TBL.Trip and TBL.TripDiary

A trip is logged in the trip table, and then an operator logs a diary entry against the trip. One of the options that the operator selects is when they receive an email back from the traveller, this is logged as a diary entry.

I need the query to look at the DIARY_Action field and select all records in the TBL.Trip that DO NOT CONTAIN an entry for Diary Action "4".

I can produce a select query that gives me the results to see all trips that HAVE had a response, with a simple IS LIKE "4" query in the action field.

If I change this to IS NOT LIKE "4", I get the results that I need, but duplication due to the various other "diary" entries in the table".

I simply need the inverse of the IS LIKE query but cannot see how to remove the duplicates?

View 5 Replies View Related

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

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

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

Queries :: Combining Data Results From Multiple Queries

Sep 30, 2014

I am working on a report that has some special characteristics.

Let's say I have a list of groups of Vendors in a table, complete with VendorID. I have 3 other tables that use the VendorID: Complaints, Complements, and Terminations.

Each of these tables has a date that the Complaint, Complement, and Termination notice was received.

Every Fiscal Quarter, a report is pulled that looks back over the 4 preceding quarters to determine if a 5% threshold has been crossed by any of the vendor-groups in regards to the amount of Complaints they received.

The equation used for that is : (complaints/vendors_in_group)*100

It is imperative that the information has the current fiscal year and fiscal month (which I am tracking with functions from MS website), and I need to be able to store the information attached to the fiscal year and month.So when a user goes to the form and inputs the desired Fiscal Year and Fiscal Month, the database can display the 4 previous quarters of information...split into Q1, Q2, Q3, and Q4.

What I would like to have happen is to be able to have one table where the information is stored, quarterly, so that it can be retrieved for the report.

Questions:
1. Is it possible to have one line, per VendorID, that has the total number of Complements, Complaints, and Terminations, as well as the threshold percent stored in a table? Right now, I am getting LOTS of duplicates and blank lines when I try to put them all together. It has the right data, but takes about 10 rows per VendorID.

2. It is very important that the total number of Vendors in a group be captured on that quarterly report, so maintaining that number, in the same table, is essential and must be tied to the VendorID.

3. I have looked at Union Queries and Crosstabs, but I just dont know enough about them to make it work.

View 4 Replies View Related

Multiple Summary Total In A Report

May 19, 2015

How can I generate a report that contains multiple summary total by year. I run the query to give me selected time period(s) for my report. For example: I want to have the summary for the date ranges from the year 1994 to 2001, and then 2002, 2003, 2004 etc. I'm having difficulty for the first summary total which is the date range from 1994 to 2001.

View 3 Replies View Related

Joining Results From Multiple Queries.

Nov 26, 2007

Hi,

My SQL is fairly basic so excuse me if this is something simple.

This isn't my database, I am trying to create a report on someone else's and it's a poor structure (sound familiar :-).

If I have created two queries; one of which selects results on students from one table and the other selects results on students from a completely different table.
This means I have two Hi,

My SQL ability is fairly basic so excuse me if this is something simple.

This isn't my database, I am trying to create a report on someone else's and it's a poor structure (sound familiar :-).

If I have created two queries; one of which selects results on students from one table and the other selects results on students from a completely different table, how do I combine these results into one query so I can run a report on it?

To outline the situation, I have two different queries with identical data types but from two different tables. I need to query these two queries and (possibly) link in another ‘student information’ table so that I can display the results from both queries as if they all came from the same place.

The addition of the extra table in the final query would only be so I can add extra student data into the final report.

Hope this makes sense!

Thanks,

Matt.

different queries with identical data types

View 2 Replies View Related

Queries :: Multiple Results From One Entry

Sep 25, 2013

The below isn't the actual use but it is easier to explain like this...

I have a system set up on access and I have a front page (form) where I can enter the reference number (1141#2) of a building (YELDR for example).

This then fills in information in the other fields on the front page. For example address, number of doors and entry codes.

My problem is that this only displays one door and one entry code. I need it to display all doors and all entry codes so that I can just type in my reference number and have something that looks like the below but for all of them. It works fine at the moment but only for one of the results when there can be up to 10.

Reference No. YEDJR <---------------- I ENTER THIS

Address - high Street - London - UK <-------------- All of these fields are populated using the query

Doors - Green - front <-------------- All of these fields are populated using the query
- Red - side <-------------- All of these fields are populated using the query
- Orange - back <-------------- All of these fields are populated using the query

Codes - 10111 <-------------- All of these fields are populated using the query
- 10221 <-------------- All of these fields are populated using the query
- 10256 <-------------- All of these fields are populated using the query

I know this is probably nowhere near enough information but is this possible? I don't know SQL so i would have to use the designer.

This is the SQL which I have at the moment though (I didn't write it i just copied this from design view on the query)

Code:

SELECT [Site Info Data].[1141 #2], [Site Info Data].[1141 #2], [Site Info Data].[Site 2 Name],
[Site Info Data].freq, [Site Info Data].status, [Site Info Data].[Site 2 Owner], [Site Info Data].[NGR #2],
[Site Info Data].[Address #2], [Site Info Data].[Postcode S2], [Site Info Data].[Dish size #2],
[Site Info Data].[Dish height #2], [Site Info Data].[Dish Bearing #2], [Site Info Data].RCLO
FROM [Site Info Data]
WHERE ((([Site Info Data].[1141 #2]) Like [Forms]![Front Page]![txt1141] And ([Site Info Data].[1141 #2])
Like [Forms]![Front Page]![txt1141] And ([Site Info Data].[1141 #2]) Like [Forms]![Front Page]![txt1141]));

View 5 Replies View Related

Summary (Count) Of Multiple Date Fields By Month

Feb 13, 2014

What I have: A table with multiple Date/Time columns. Here's an example:

What I would like: A month-by-month summary counting the number of entries in each of the three columns, like this:

I'm indifferent as to what happens with the months zeros across all three fields (whether they show up in the report with zeros or are omitted altogether).

Smaller Pieces: I am able to create such a summary for one column at a time:

Not what I'm looking for: I can not figure out how to create a query that does this for all three columns. My best attempt was a disaster:

I have attached the example file for your convenience: Database1.accdb

To clarify, my issue isn't the format of the date. I know about the Month(...) function. My question is regarding how to count this data and split it into a month-by-month summary (see the picture above in the "What I would like:" section)

View 6 Replies View Related

Reports :: Summary Of Multiple Records - Open Report With Button

Jan 27, 2014

I have a report that is a summary of multiple records in it. What I have next to the record on the report is a button.I have report that are labeled:

rptIncident Summary
rptIncident Report
and a button labeled
"open report"

I would like to click on the button and then it open the rptIncident Report with all the information, not just the summary. I will put a picture so you know what I am trying to accomplish.Is this a simple Onclick event with a where condition or what? Or does this go beyond to having something to do with VBA?

View 14 Replies View Related

Counting Results Of Multiple Queries And Displaying The The Reults On A Single Form

Apr 17, 2007

Im making a database about past bid results. In one table i have a list of bidders and which place they came in (along with some other information). I have 20 positions (1st place, second place and so on...), so i made 20 queries that search through the table for my company's name so we can see how many times we came in first, second, third and so on. Now i would like to bring the number of records in each query to a single form. I tried making another query to using the count feature on the other 20 queries but it keeps returning 0 as the number of results per query. But when i open each query up there are obvisouly more that 0 results in each. Is there a way i can bring up the number of results per query all on one form?

Thank you

Dan

View 7 Replies View Related

Combining Multiple Query Results

Dec 4, 2006

Hi,

I'm putting together a (hopefully) highly automated database that will allow me to produce clear reports for various areas of responsibility in a new job.

I have 3 excel spreadsheets linked directly to access, containing work queue reports. I then run queries that copy new work items into a main table, followed by a query that looks for work items that no longer appear (i.e. work is finished and closed) and then automatically inputs the date.

For reporting purposes i initially want a basic output, i.e. work items raised, and work items closed, for each area of resposnibility. The only trouble i've found is that i have to do a different query for each output, then another query that pulls all the other queries together in order to maniuplate into a graph...

So at the moment i have two queries per responsibility, and one pulling those two together i.e.:

New Work Items:
SELECT Count(ticketsds.id) AS [DS New]
FROM TicketsDS
WHERE (((Format(ticketsds.[date received],"mmm"))=Forms!ReportingDate!comboMonth));
Closed Work Items:
SELECT Count(ticketsds.id) AS [DS Closed]
FROM TicketsDS
WHERE (((Format(ticketsds.[datefinished],"mmm"))=Forms!ReportingDate!comboMonth));

Then i have this query pulling the two results together:
SELECT DSClosed.[DS Closed], DSNew.[DS New]
FROM DSClosed, DSNew;

Is there anyway of combining the first two queries into one, rather than have 3??

Any help would be greatly appreciated, as if i could find out how to do this it woudl enable me to streamline other queries....

Many Thanks!
Gareth

PS I've tried 'UNION' but that just tags the other results under the same field name which i can't use to create graphs...

View 2 Replies View Related

Query Not Populating Multiple Results?

Oct 15, 2014

I am using the query below

What I am trying to do is get 4 combinations

1) Department + source of Tag+ specific Date
2) Department + Specific Date
3) Source of Tag + Specific Date
4) All records

This query is meeting my 2nd and 3rd condition however if I delete the parameters for 2nd and 3rd 1st combination works fine. But I want all four conditions met in one query

SELECT [Unsafe Act Unsafe Condition].*, [Unsafe Act Unsafe Condition].Department,
[Unsafe Act Unsafe Condition].Date, [Unsafe Act Unsafe Condition].[Source Of Tag],
[Unsafe Act Unsafe Condition].[Close Date]
FROM [Unsafe Act Unsafe Condition]
WHERE ((([Unsafe Act Unsafe Condition].Department)=[Forms]![frmHighLevelReport]![cboDepartment])

[Code] .....

View 5 Replies View Related

Query Results Multiple Records For One Person

Aug 3, 2005

I enter personnel data into a table through a form. The same person may have multiple records in the table. With each record there are yes/no boxes to be checked if that person is verified at a certain station. Let's say PERSON A has six records in the table. Let's say on one of those records he has StaPrimary yes/no box checked (or true).
I need a query to do the following: My query is to find out if any person listed in the table does not have any StaPrimary yes/no boxes checked. My dilemma is when I do the query if Person A has six records and one of the records has the StaPrimary yes/no box checked his name will still show up in the query because he has other recrods with the StaPrimary yes/no box not checked. I want to check all of each persons records in the table and if they have one StaPrimary yes/no box checked I do not want there name to show up in the query. How do I do that?

Thanks for your help

View 4 Replies View Related

Reports :: Query Results In Multiple Columns?

Jun 29, 2015

I have a simple report which shows data form a table through a basic query and displays it just as the table view. I was wondering if there is a way to get this information to display in two columns on a page rather than just one list which takes up multiple pages?

View 6 Replies View Related

Queries :: Summary Of Columns In TSQL To Return -1 If Not Equal To 0

Sep 3, 2014

Is there an efficient way to return a -1/0 instead of some number/0?

A table has 4 outer joins to views that return a value or null depending on if that field represents a Federal lease.

These 4 outer joins work.

The result is a ID_Wells column and 4 columns with any combination of values or Null.

This line of TSQL:

ISNULL(ISNULL(dbo.vRE_FedLeaseType.Fed_Lease_Type, '')
+ ISNULL(dbo.vRE_FedLeaseMinOwn.MinOwn, '') + ISNULL(dbo.vRE_FedLeaseSurfOwn.SurfOwn, '') + ISNULL(dbo.vRE_FedDirHzLease.Expr1, ''), '') AS HasFedLease

This creates another final summary column [HasFedLease] that returns 0 or some number.

For the Rule Engine - 0 is False, any other number is True.

Access links to this SQL View. Is there a quick way with out a UDF to convert numbers > 0 to a -1?

Code:
SELECT dbo.Wells.ID_Wells, dbo.vRE_FedLeaseType.Fed_Lease_Type, dbo.vRE_FedLeaseMinOwn.MinOwn, dbo.vRE_FedLeaseSurfOwn.SurfOwn,
dbo.vRE_FedDirHzLease.Expr1 AS CountOffedLeaseDirHz, ISNULL(ISNULL(dbo.vRE_FedLeaseType.Fed_Lease_Type, '')

[Code] ......

View 3 Replies View Related

Multiple Query Results Not Populating Report Properly

Sep 29, 2011

I currently have a combo box (combo121) on a form. I select the "Company" which is connected to "Company" in the query via [Forms]![courseinfo].[combo121]..That is working. When I press the "query" button on the form the selected company in the combo box is updated in the query and it updates the report templates.I also want to use the same system to populate a different report, using the same query. This works a bit differently.

Once the company is selected in the first combo box(combo121). I have other combo boxes which bring up students attached to that company. I have multiple combo boxes because I need select multiple students for the one report. These students are in fields "First Name" and "Last Name". So in the query I can only have those fields once. I have several links to the several combo boxes under "Last Name" as that is the "bound" selection for the combo box:

[Forms]![courseinfo].[comboname1]
[Forms]![courseinfo].[comboname2]
[Forms]![courseinfo].[comboname3]

Problem I am finding is this is bringing up several lines in the query. So when I try to populate the report with all of the different Students I have selected for the query, it won't work properly because I can only put "First Name" & 'Last Name" fields on the report once.

View 4 Replies View Related

Queries :: Summary Reports Via Queries?

Jul 6, 2013

i have a db consist of order table of three basics no 1 is battery no 2 is parts and no 3 is i have made a query transaction based on that.

Now what i need is to get total monthly sale amount of above three category .. then same as for daily and also how can i show all these reports in one summary report.

View 2 Replies View Related

Queries :: Single Page View - Record Count Summary

Jul 30, 2014

I am basically looking for a way to display the total number of records for a selected number of tables and queries in my database on one screen or on one single page view. The problem with using reports or forms is that they tend to bind you to a single table as a record source. This summary would require multiple tables and queries. The summary data would look something like this with a total coming from a Count() or count type function:

# of records: 3000
# of records to insert: 500
# of records to delete: 400
# of records to update: 2100
# of records changing location: 100

and so on. One from each table or query.

View 7 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

Queries :: Join Results Of Unmatched Query With Matched Query To Include Null

Mar 24, 2013

I am trying to do the good 'ol sales report (query) to include customers with no sales.

I have a customers table, account number table, sales table & sales (line) detail table. (all linked in that order)

If I run a query to show customers (in the customer table) with account numbers, that works

An unmatched query to show customer without an account number works (but of course the unmatched account number field isn't shown).

How can I get the two two be shown together with the "unmatched" having a null or 0 for their account number?

I am guessing in principle, the resulting solution can be modified to show customers without sales alongside those with sales?

View 3 Replies View Related







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