Two Queries / One Report

Dec 28, 2006

'Two queries / one report' seems to be a common topic, but I still can't find the information I need.

Normally I am pretty good at finding answers through google or by searching a forum like this one, but in this case I don't know exactly what I'm looking for help on.

Let's say I have two tables that look like this:

Employees
---------
ID
Name
Hire Date


Absence
-------
ID
Date
Reason


So there is a one-to-many relationship and the tables link on ID.

I want a report in which each page looks a little something like this:

=====
Name: John Smith
ID: 123

Absences:
Dec 12, 2006 sick
Dec 18, 2006 car trouble
Dec 22, 2006 cat died
=====

I think that putting all these fields into a single query and feeding that into a report would give me a separate page for each absence, would it not?

I see the word "subreport" thrown around now and then, maybe that is what I'm looking for, with two queries . . ? :confused:

In case it matters, there are a couple other associated tables similar to Absences that I would like to include later on, so I'm looking for a solution that will work with more than one linked table.

Any help would be greatly appreciated. Thanks very much in advance.

-SD

View Replies


ADVERTISEMENT

Queries :: Call Two Different Queries From Report Wizard To Produce Report?

Jul 31, 2013

I am looking to call two different queries from report wizard to produce report. Getting error message what to do in this situation as both queries are important as i have to pick all records from query A and just one record from query B any other option to get this in report.

View 4 Replies View Related

Queries :: Utilization Report - Multiple Query Into One Report

Sep 2, 2014

I have a three-column query that tells me how many hours I have available per week for a given resource type (e.g. welders). I have a second three-column query that tells me how many hours of work I have planned per week for a given resource type.I'm hoping to produce a query (the source for a report) that will show resource types in rows and twelve months in 24 columns. the first column for each month will show how many hours I have available for all my resources, the second column for each month will show how many hours I have allocated.

How do I produce a query that will combine the other two queries, inserting zeroes where necessary considering that for any given week I might have allocated work to a resource that isn't available (because the inconsiderate buggers think they are entitled to holiday) or I might have a resource that has no work allocated (because I'm incompetent)?

View 8 Replies View Related

Queries :: Report Or Macro To Run Multiple Queries Using Same Parameters?

Aug 9, 2013

So I run cash flow for a business, and we export data from Oracle and insert it into an access database. I have to run about 25 queries, entering in the same parameters for each. We number each week of the year. So for say the first week in January, I would run the first query and it asks: Beginning Week, I enter in 1, then another paramter value asks me the ending week. I have to enter in these parameters for each of the 25 or so queries, and it becomes quite irritating. Each query has a number of columns, but I am only interested in obtaining the sum of one of the columns, titled Distribution amount. So I am looking for something that will run each of my specified queries, then spit out the total of the distribution column for each in a table like.

Query 1: Total Distribution
Query 2: Total Distribution
etc....

Is there anything that would allow me to do this, with entering in the week parameter once, say week 1 start, week 1 end. and it use those same parameters for each query?

View 1 Replies View Related

Report From Multiple Queries

Dec 21, 2004

I have a database which contains around 60 queries that I need to turn into reports. The problem is, the wizard won't work because all of the queries contain the same fields. I would greatly appreciate feedback on making this process dynamic. Thanks in advance!

View 1 Replies View Related

Data From 3 Queries Into 1 Report

Apr 11, 2008

Hi all, let me start by saying that i am not that experienced with access but find it really enjoyable and want to learn more. i dont always understand or use the right "jargon" but here goes. i have a db with 3 main tables, each table has the same layout and info inputed into it (ie, name, address, product, ref no. etc.). from each table i can print a sales reciept with all of the relevent info on it. i also print a sheet (report) with the customer names & addresses on it, used as the postal labels. i currently print 3 postal label sheets, 1 for each table. what i would like to do is print just the one report but taking the name & address data from all 3 tables. would really, really, really, really appreciate any help on this as it is beginning to frustrate me, and waste a lot of paper !!.

i'm using access from microsoft office professional plus 2007.

many thanks

dbwannabe

View 4 Replies View Related

Queries :: Report At A Given Date

Nov 10, 2013

I have 3 tables: Company, Client and Status. The Company/Client combinations can have various statuses over time (I use the field Rstatus in the Status table), including the values pass and fail.

Companies are assigned statuses for Clients periodically. Statuses could be eg:

Company A, Client 1, 01-01-2001, pass
Company A, Client 1, 02-01-2001, pass
Company A, Client 1, 01-09-2001, fail
Company B, Client 1, 01-02-2001, fail
Company B, Client 1, 01-03-2001, pass
Company C, Client 1, 01-03-2001, pass

I would like to make reports that will tell me:

1. All historical records for a given company/client combination at a given date (in history). Which statuses did we have at date xyz?

2. Of which company/client combinations the latest status was pass at a given date. For Client 1, which companies had Rstatus pass at date xyz?

View 7 Replies View Related

Printing Report Re-runs All Queries

Jan 31, 2008

I have a report with several subreports which run agains a very large table. If I decide to print the report after examining it, all of the underlying queries must run again. Is there any way around this to avoid this delay, other than exporting as rtf or snp?

Thanks,

Randy

View 1 Replies View Related

Emailing Queries/report By Using A Form

Oct 21, 2005

Well im close to putting my DB into action, but I'd like to have a form that will show a list of queries and reports where they can be selected and emailed. I would like to be able to choose one or many files. I have created the email module and its working fine, I just thought I could make it a bit easier to send multipule reports with the click of a button. I just can't find a way to list all my queries/reports in a dropdown list. Can someone send me a suggestion on how to do this if posible.. Thanks in advance.


Scott

View 1 Replies View Related

Using Multiple Queries To Create One Report

Dec 14, 2004

I have several queries that I'd like to consolidate into one report. Any ideas? I tried selecting fields from multiple queries, but I got an error message.

View 2 Replies View Related

Linking Multiple Queries In A Report

Mar 20, 2008

Hi

I am very new to Access and have been building a database from scratch. It is for inventory management and I have a number of tables, particularly:
1. Stock List
2. Orders (stock coming in)
3. Requisitions (stock going out)

I have created Select Queries for the Orders and Requisitions tables to sum the totals in these tables (i.e. the total number of Pens coming in from all of the orders etc.). These are called StockOrderTotal and StockRequisitionTotal.

I am trying to create a query/report that will allow me list all of the Stock items and the current balance (i.e Orders minus Requisitions) for each item. However, once I add the two queries together (StockOrderTotal and StockRequisitionTotal) the final query/report only lists stock items that are found in both of the underlying tables.

Is there any way that I can tell the query to return all stock items and only list the Order and/or Requisition totals that are in the underlying tables? Sort of like an 'if' statement in Excel, where the value returned will be zero if that particular stock item is not found in the Orders or Requisition tables?

Thanks
Rich

View 3 Replies View Related

Queries :: Report Not Finding A Field

Oct 11, 2013

I have a form that runs a report with two text boxes, one combo box, and a button.

The text boxes hold dates and SQL feeds them the oldest and newest dates from their fields (Date Received and Date Taken). They work fine, when the form is opened, the fields are filled and if I change the dates, the report pulls back data from the correct range.

The combo box is called Analyst Name and this is the row source within the parenthesis (SELECT [PickList-AnalystName].ID, [PickList-AnalystName].[Analyst Name], [PickList-AnalystName].[Analyst Manager] FROM [PickList-AnalystName];). The bound column is 2. The correct names are displayed, it looks like it works fine but then there's the button.

The button is named cboAnalyst. Enabled - yes. On Click - Event Procedure. This is the code with the backslashes added:

option compare database
//Private Sub cboAnalyst_Click()
Dim strCriteria As String
If IsNull(Me.[Analyst Name]) Then
strCriteria = ""
Else
strCriteria = "[Analyst Name] = "" & Me.[Analyst Name] & """
End If
DoCmd.OpenReport "Ad Hoc Reporting", acPreview, , strCriteria
End Sub

If I run this without a name, I get back all of the data within the right time frame. Once I put a name in, the report comes back empty, showing 0 for the count. I don't even get an error, I just get that empty report.

View 3 Replies View Related

Queries :: Getting Two Lists In One Query For A Report

Dec 18, 2013

I need to get a query back that may have more than the given number of records on either side, but need to not duplicate in either of the two columns. Works better to show what I need, I think...

Query needs to return: PersID.....Name.....Assist.....Device

Base data looks like this (after using query with Person and AssistType and Device tables):

Assistance:
1.....Adams...Dress
1.....Adams...Bath
2.....Jones....Bath
3.....Case.....Dress
3.....Case.....Bath
3.....Case.....Feed

Devices:
1.....Adams...Walker
1.....Adams...Lift Chair
1.....Adams...Wheelchair
3.....Case.....Wheelchair
4.....Doe.......Walker
4.....Doe.......Cane

What I've been asked for is something that looks like this:

1.....Adams.....Dress....Walker
1.....Adams.....Bath.....Lift Chair
1.....Adams.....-----....Wheelchair.......... ===> Null or blank in the empty column is OK; I can work with those
2.....Jones.....Bath......-----.............................................
3.....Case.....Dress......Wheelchair
3.....Case.....Bath......-----
3.....Case.....Feed......-----
4.....Doe......-----.....Walker
4.....Doe......-----.....Cane

Regardless of join type, I get variants on:

1.....Adams.....Dress.....Walker
1.....Adams.....Dress.....Lift Chair
1.....Adams.....Dress.....Wheelchair..........
1.....Adams.....Bath.....Walker
1.....Adams.....Bath.....Lift Chair
1.....Adams.....Bath.....Wheelchair..........

I can print it with two subreports (one for each column), but that is running slower than I would like. It's workable if we absolutely have to do it that way, but I'd rather see if I can get it out in one query and use the grouping functions in the report (there are some other fields involved, but they don't really affect what I am doing here)

Is there any way to do a query (even a couple of queries if it takes that to set it up) that will give me what I am looking for?

View 7 Replies View Related

Queries :: Report Value As Parameter In Query

Oct 24, 2013

can i set a value in report as parameter in query

View 1 Replies View Related

Reports :: Generate Report From More Than Two Queries

Sep 10, 2013

I have to compile a report from more than two queries. All queries have a field common between them.

E.g.
query1 gives name, address and contact number of all the 30 students in a class
query2 gives semester wise marks obtained by each student
query3 gives performance in sports of each student.

All the three queries have name of the student common in them.

Now I wish to generate a report card which should be as under:

1. The record of query1, query2 and query3 corresponding to a particular student should come together.
2. The record of query1, query2 and query3 corresponding to the next students should come after that and so on.....

I tried using a sub-report but it ends up displaying all the records of query1 first and then all the records of query2 and so on...

View 7 Replies View Related

Queries :: Display Last Record On A Report?

Jun 30, 2014

What I am trying to do is have the user click a button to open a report based on the current specification they are updating. Now for each specification there are multiple revisions so i added a 'revision history' table. When the user prints the specification, I only want the latest revision number, date, and rev descr to show. I tried using the following:

Private Sub Report_Load()
Dim db As Database
Dim Rev As Recordset
Set db = CurrentDb()
Set Rev = db.OpenRecordset("SELECT tblRevisionHistory.revnum, tblRevisionHistory.revdate, tblRevisionHistory.revision FROM tblRevisionHistory;")
Rev.MoveLast
Me.Text23 = Rev.Fields("revnum")
Me.Text26 = Rev.Fields("revdate")
Me.Text28 = Rev.Fields("revision")
End Sub

The above only showed me the last record in the table regardless of the specification number filter.

View 4 Replies View Related

Reports :: Multiple Queries Into One Report

Jun 18, 2013

We have a database that has around 30 queries that are ran on a monthly basis. They all have unique criteria (but there is a crossover of fields that are used), and are all set up so they show only the previous month's data (the date is taken from one date field for some queries, and another date field for others).

We run the queries, and only need the 'count' of number of records that fit the query each month.I was wondering if it is possible to create a report that will run the queries simultaneously, and show the 'count' of the query results in predetermined fields.

View 6 Replies View Related

Queries :: Three Different Tables - Last Status Day Report

May 17, 2013

I have 3 different tables in a DB that I need to combine to get information on for 1 report.

table 1- Has the main info, (CR#) doc number, when issued, due date, etc...
table 2 - Is a Status table which in form view will show date and time of the status of a document and who has it.
table 3 - have what type of document it is and how many submitted.

The reports needed are: open status (what is the status of that doc. who has it and only need the last status) and the report needs to have on it: the cr #, what type of doc.

I have done a query combining the 3 tables and it is not showing correctly here? I just need the last date entered into status.

SELECT Max(tblsignatures.date) AS MaxOfdate, (([ReportDate]-[DateIssued]))-((DateDiff("ww",[DateIssued],[ReportDate]))) AS [Total Days], tblsignatures.status, tblitem.ReportDate, tblcr.CR, tblcr.DateIssued, tblcr.DueDate, tblcr.ClosedDate, tblitem.item, [DueDate]-Date() AS DueDates
FROM (tblsignatures INNER JOIN tblcr ON tblsignatures.cr = tblcr.CR) INNER JOIN tblitem ON tblcr.CR = tblitem.cr
GROUP BY tblsignatures.status, tblitem.ReportDate, tblcr.CR, tblcr.DateIssued, tblcr.DueDate, tblcr.ClosedDate, tblitem.item, [DueDate]-Date()
HAVING (((tblcr.ClosedDate) Is Null)

View 2 Replies View Related

Need Single Report To Pull From 2 Queries

Mar 14, 2012

I have 2 reports that use a separate query to pull their data. One Query is called "Outdoor Lighting by Model Number Full Query".It is very simple, pulling just 4 pieces of data, SQL code is as follows:

SELECT DISTINCT [Call Log].[Model #], Sum([Call Log].Quantity) AS [Sum Of Quantity]
FROM [Call Log]
WHERE ((([Call Log].Date) Between [Forms]![Date Range Entry]![Start Date] And [Forms]![Date Range Entry]![End Date]) AND (([Call Log].[Product Type])=4))
GROUP BY [Call Log].[Model #]
ORDER BY Sum([Call Log].Quantity) DESC;

I run a report named "Outdoor Lighting by Model Full Report" which takes the above query. The detail portion of the report only has 3 sections:

Model #, Quantity, Percentage. Quantity I have showing "Sum Of Quantity" and Percentage is showing "=[Sum of Quantity]/Sum([Sum of Quantity])" Therefore, for a particular model # it gives me the number and then calculates what percentage that number is of the total. Works fine.

My second report is laid out exactly the same, except it pulls data from a different query that only returns the top five results. The code for that query is as follows:

SELECT TOP 5 [Call Log].[Model #], Sum([Call Log].Quantity) AS [Sum Of Quantity]
FROM [Call Log]
WHERE ((([Call Log].Date) Between Forms![Date Range Entry]![Start Date] And Forms![Date Range Entry]![End Date]) And (([Call Log].[Product Type])=4))
GROUP BY [Call Log].[Model #]
ORDER BY Sum([Call Log].Quantity) DESC;

The second report, appropriately named "Outdoor Lighting by Model Number Top 5 Report" only shows the top 5 and then gives a quantity and calculates a percentage. My problem is that the percentage is calculated based off of the total of just the top 5 query. I need it to calculate based off of the total of the full query.

I currently have percentage doing this "=[Sum of Quantity(Top 5 Query)]/Sum([Sum of Quantity(Top 5 Query)])".What I want it to do is this "=[Sum of Quantity(Top 5 Query]/Sum([Sum of Quantity(Full Report Query)])

View 2 Replies View Related

Automating Report Construction From Queries

Sep 14, 2011

I have a very large query that includes order data for about 100 clients. There are two smaller queries that take data from this one (to group by a "job code" and by a "job category"). I'm looking for a way to automate the process of running the series of three queries and producing an output (table or report) that gives the relevant data I need. I want to run this process for all ~100 clients, so I don't want to manually edit each query and copy and paste the results every time, but I'm having trouble creating a macro that will accomplish this.

View 10 Replies View Related

Using Same Date Range On Report For Multiple Queries

Jul 25, 2007

Hi all,

Can anyone tell me if it is possible to input just one date range into a report that is accessing data from multiple table and multiple queries. I can create the report which gives me the info needed but I have to put the same date range in 3 or 4 time before the report is generated.

Thanks

View 4 Replies View Related

Single Set Of Parameters For Multiple Queries In A Report?

Oct 21, 2004

I'm pretty new to Access, so if I'm doing this the hard way, that's why.

I work in a quality control position, and I'm trying to set up a single Access database for the QC staff to use instead of everyone having their own seperate Excel workbooks.

The issue I'm running into at the moment is on a report. Each record is graded on four seperate types of criteria, Error Type 1, Error Type 2, Error Type 3 and Error Type 4, all of which need to be reported on seperately. So I have at least four queries set up, all with the same parameters (right now, just review date.) I'm trying to pull through all four queries on the same report, and so far I've had success having the report ask for the parameters only once and then applying it to all four queries. However, I'm running into a problem where Access is now forcing the filters of each individual query on to each of the other three queries, so it's only pulling through records for all four queries that match the criteria of all four. Any record which only matches the criteria of one, two or three of the queries is being left off the report.

Sorry if this sounds confusing. Anyone have an idea as to what I'm doing wrong?

View 3 Replies View Related

Reports :: Combine Two Cross-tab Queries In A Report

Mar 19, 2013

I understand that I can't set multiple "values" in a crosstab query but I need to have both a UPC and a price display in a report(Price List) for Our Exotic Wood selections like so:

Wood Type 4/4 5/4 8/4 12/4 16/4 20/4 24/4

Afr. Mahogany |||| ||| ||| |||| |||| |||| ||||
$15 $20 $30 $40 $50 $60 $70

Rosewood |||| ||| ||| |||| |||| |||| ||||
$15 $20 $30 $40 $50 $60 $70

I have 2 crosstab queries one that gets the price and one that gets the UPC I can join them and get it to print on every other line but there is no way that i can find to print two lines at a time in a report so my question is there a way to achieve the outcome described above with two crosstab queries? do I need more queries or a different kind of query?

View 1 Replies View Related

Queries :: Summarizing / Counting Data In A Report

Feb 8, 2015

I'm using Access 2010. I have a report that summarises students and the number of courses they are attending after a set date. My query lists name, course date, course description, the count being on the course description. I thought it was working until I noticed that students are listed twice if they attended courses on two separate days.

For example
Liz 4
Liz 3
instead of
Liz 7

I have moved the count to other fields but it then doesn't show any students at all when I run the query.

View 3 Replies View Related

Queries :: Report / Query Viewing By Colleagues

May 22, 2015

Im not an Access wiz but have managed to build quiet a few different queries in Access which are from tables linked to the software that holds all our data.Im looking for some way to put all these queries in one please for all my colleagues to VIEW ONLY. I just want some sort of really simple dashboard for the person to pick a report they want from different categories and it will export it to Excel for them.I have thought of building this in Excel because I have some knowledge of VBA in Excel.

View 9 Replies View Related

Queries :: Return Value In A Text Box On A Report If String Contains?

Mar 24, 2014

In my query, I have the week number and year arranged like this - "Y14-W11"

I want to return a value in a text box on a report if the string contains, for example, W11. In this textbox I've put the expression

Code:
=IIf([Y##-W##]="*" & "W11" & "*","2100000","BLAH")

But this just returns the falsepart no matter if the string contains W11 or not.

View 3 Replies View Related







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