Report Based On Query

Sep 17, 2006

hello everybody,

Im facing the following problem.
I have several tables with information about one subject, now I want to place all the information from the subject in one report. Now I know I can do this with a query with loads of joins, but when I try this I don't get any result.

Is it possible to fill fields in a report based on a query? Say something like

me.test.text = "Select year from tbltest where city = " me.test.value

I hope my problem description is enough, otherwise I'm more than willing to explain.

Thanks,

Peter

View Replies


ADVERTISEMENT

Queries :: Query To Run Before Report Based On Criteria Based From Two Combo Boxes On Form

Mar 20, 2013

I have a report that gets its data from a query. I need the query to run before the report based on criteria based from two combo boxes on a form.

View 3 Replies View Related

Help With Printing A Report Based Off A Query.

Jun 13, 2006

Hi all..

I have a drop down list on a form that prints a report based off of the selection in the cbo box...

(I have already changed the query and relationship for the lookup and maintable)

Here is the code that works fine,(this is on a command button)

Private Sub cmdViewStreet_Click()
stDocName = "rptStreetName"
On Error Resume Next
DoCmd.OpenReport "rptStreetName", acViewPreview, acEdit
Me.cboStreetName = Null
End Sub


What I am doing now.. is this: the look up table that had the street names but did not have an autonumber or primary key. I added in a autonumber and primary key. I can get the cboStreetName to list the street names and not the autonumber.. and I can get the main table to store the autonumber not the street name (this is what I want).. but now I can't get it to view what is in the cboStreetName... When I hit the view button it does nothing... Any suggestions?? If you need more info please let me know...

I tried something like this to:

Private Sub cmdViewStreet_Click()
On Error GoTo Err_cmdViewStreet_Click
Dim stDocName As String
stDocName = "rptStreetName"
DoCmd.OpenReport "rptStreetName", acPreview, , "[StreetName]=" & Me.cboStreetName.Column(0)
Exit_cmdViewStreet_Click:
Me.cboStreetname = Null
Exit Sub

Err_cmdViewTitle_Click:
MsgBox Err.Description
Resume Exit_cmdViewTitle_Click

End Sub


R~

View 1 Replies View Related

Report Based On An Unmatched Query

Nov 20, 2006

Good morning all,

I have a report based on an unmatched query. Sometimes the query doesn't return any results. When this happens, the "Detail" section of the report displays #Error. How can I get the report to show $0.00 for the dollar fields if there are no results in the unmatched query?

Thank you vey much for your help!

View 5 Replies View Related

Reports :: Report Based On A Query?

Nov 3, 2014

I want to be able to run a report based off my "Allot_Q" query. I have a button to perform the report but would like the button to update the query and run my report based on my selection text boxes. Right now I have one button the runs the query based on the selection and then another button to run the report. My boss wants one button to pull the report based on the selection.

View 1 Replies View Related

Reports :: Report From Query Based On ID

Oct 10, 2013

there is a query and report "01 qry Main" and from the main FORM I like to print out into txt file actual record, my code is:

Private Sub Command24_Click()
On Error GoTo Err_Command24_Click
Dim stDocName As String
stDocName = "01 qry Main"
DoCmd.OutputTo acOutputReport, "01 qry Main", acFormatTXT, "D:10 DbaseCTQ stuffsaveReportFormat.txt", False

code]...

there should be an option "ID = " & Me.ID.Value or something like this to print out only actual record.

View 6 Replies View Related

Report Based On Query Variable Issue

Jan 31, 2006

I have a report that looks at a query. The base data contains a field called 'functlocation'. Now this data can vary in length and looks something like the following

12080026335PDPV5448-1
12080025507PUMP
12080004003BUILDINGS
12081925507PUMP
12081925507PUMP

Now the first 6 digits represent a particular building no. There are actually 6 buildings. When I run the report I am trying to get the report only to show all tasks against 120819 but with a wildcard at the end. I created a mini table with the 6 building numbers in, but i can't work out how to incorporate the wildcard into a parameter query.

regards

vipa:)

View 5 Replies View Related

Run A Query/report Based On Selection From List

Feb 10, 2006

Dear all, is it possible to run a query (or ideally a report) based on a selection from a drop down list in a form? (in accsess 97). The reson being is i have a big list of of codes for different absence reasons & at present the user has to type in the correct code to display the data in a report based on the code they enter, however its not easy for users to remember which code to type in to run a report.

Idealy what i would like is a drop down list with the absence codes & the absence desciption next to each code, then when the user selects a code from the list it displays the corresponding data in the report?

Is this possible?, any help would be much appreciated, thanks.

View 4 Replies View Related

Generate Value For Text Field In Report Based On Query

Jan 20, 2008

Okay I have a report (rptHorneOstbergQuestionnaire) that is based on a query (qryrptHorneOstbergQuestionnaire). In the report I have a total (HOTotal) which is the result of an expression created in the qry. Based on this result I would like to generate text in a text field (HOType) that is found in the same report.

Basically if the field HOTOtal shows any vaue between:
16 and 30 then I want the unbound text field to show the text Definitely evening typw and so on ...(see case statement below)

I thought I could do a case statement on report open but I am getting an error that my expression contains no value.

Here is the case statement

Private Sub Report_Open(Cancel As Integer)

Select Case Me.HOTotal

Case 16 To 30
Me.HOType.Value = "Definitely evening type"
Case 31 To 41
Me.HOType.Value = "Moderately evening type"
Case 42 To 58
Me.HOType.Value = "Neither type"
Case 59 To 69
Me.HOType.Value = "Moderately morning type"
Case Else
Me.HOType.Value = "Definitely morning type"

End Select

End Sub


What else can I do?

View 2 Replies View Related

Reports :: Updating Report Based On Crosstab Query

Apr 19, 2015

I've got a self updating crosstab query, its essentially a monthly summary and every month a new column is added (one corresponding to the current month, i.e., next month the new column will be may, following that the new one will be june, etc)

I've designed a report to be based on this query and i tested it out by manually adding data for next month into a table, the query auto updated however the report remained the same (ended in april instead of adding a new column for may).

Just curious if there is a way to automatically add these new columns to the report every month or will i have to do so manually?

View 1 Replies View Related

Modules & VBA :: Export A Report Based On Query Which Has Parameter?

Sep 22, 2014

I'm trying to export a report based on a query which has a parameter.

this parameter has to come from the recordset.

now if i run the procedure it asks me for the parameter.

How do i get it to take the parameter from the recordset?

it should take the column 'Company#' from the recordset

here is what i have now:

Public Function mOutstandingInvoices2()
On Error GoTo mOutstandingInvoices2_Err
Dim rst As Recordset
DoCmd.SetWarnings False
'On Error GoTo BREAKOUT

[code]....

View 10 Replies View Related

Reports :: Record Source From Report Based On Nested Query?

Jul 24, 2015

I have a report that is based on nested (I think thats the phrase) query's.

Complicated Query based on another query (so I can't see a way to get at the the source SQL to change or use elsewhere)

This gives a list of say 20 records I generally want printed. I use the exact same query criteria with a separate update query to add the same to a table.

However I then wanted to just pick one with exact matching ID's I select on a form.

I could not see an easy way to apply this without making another set of nested querys which seems a little excessive

Anyway, an easy way for the printed report to do this is a simple filter added after, works great.

I can't see a way to do the same for an update query.

I was wondering if I could get the record source of this report and add to my table. I have tried with

' Dim db As DAO.Database
' Dim rs As DAO.Recordset
'Set db = CurrentDb
'Set rs = db.OpenRecordset(Me.RecordSource, dbOpenDynaset)
' Set rs = CurrentDb.OpenRecordset(Me.RecordSource)

And dozens of variations over some hours but a variety of errors mainly "too few parameters."

View 3 Replies View Related

Query Based Report Not Showing One Table In Add Field List

Jul 13, 2015

I'm an Access novice. I have a query based report that is based on several tables. All tables are joined by the same field "customer ID," but 1 table is not available under "Add Existing Fields." I cannot figure out why that table isn't available, but I need to add a field.

View 8 Replies View Related

Reports :: Access 2007 Crashes When Running Report Based On Query

Apr 14, 2014

I have DB in access 2007. I have a report that is uses a select query to generate the information for the report. It has been working great, But however lately like maybe with in the last month, it has been causeing Access 2007 to crash. I am having the same issue with another DB that uses the same information but that information is imported in. both Databases have worked great up until two months ago. Microsoft states that it is because of the program. I have tried to repair the DB by using the Repair option. I am confused as to why this would be happening. I can create a new report and it seems to work. but I do not want to change all the DB on everyone's computer just for this reason. I also have two buttons on my report that utilize macros to close or print the report.

View 6 Replies View Related

Modules & VBA :: Sending Emails To Multiple People Based On Same Query And Report

Jul 15, 2013

At present I have a tblData, a tblPeople, a long union query and a report that displays its results. On a form I select a person from tblPeople (another field on that table contains their email address), run the query and report in that person's respect and email the results to them.

What I want to do is add a button which runs some VBA code which cycles through tblPeople, runs the query for each person, works out if the query has returned any records from tblData for that person, and if so - sends them the report.

I am using Access 2010

View 4 Replies View Related

Reports :: Create A Graph (report) Based On A Query With Form Filters

Apr 25, 2014

I am trying to generate a report that is based off of a query. The query has a form filter that it needs to filter the data. I keep getting a jet engine error and couple others.

The form has year, start week, and end week on it. I can get the query to work fine. When I try to open the report, Access says it doesn't recognize the " [Forms]![frmUptimeFilter]![StartWeek] " as a valid field name or expression.

View 2 Replies View Related

Forms :: Open Query Based Report On Form With Matching Record

Nov 25, 2013

This is my data:

Table: "Facility Info"
Data in the table: "facility", "city", "date", etc.
Query: "Q Facility"
Report: "R Facility"
Form: "Main Form" is where the data is entered that goes into the "Facility Info" table.

In the "Main Form" there is a dropdown box where I can select the "facility".I would like to add a button to this form that opens my report "R Facility". But this report is a collection of all the facilities and I would like it to just report the ones for the facility that I selected from the dropdown box on my "Main Form".

View 9 Replies View Related

Report Design Response Is Slow - Based On UNION Query That Returns 12K Rows

May 20, 2005

I have a front end that is connected to three back end files. The front end is on my local computer while the back end files are on a network drive.

There are a lot of calculations that go into the queries and intermediate queries. For a report, I have based it on a UNION query.

But when trying to design the report it takes about 45 seconds just to do any one thing, e.g.;
- Add Groupings
- Add Grouping Headers//Footer, sorting option
- Add bound textbox
:eek:

Needless to say this is very annoying.
:mad:

The union query itself runs fine (takes about 15 seconds to run) and returns about 12,000 Rows. The union query looks like this (I changed the field names to make it read easier, hopefully);

SELECT a1, a2, a3, a4, a5
FROM qry_A;

UNION SELECT ALL a1, b2 AS a2, b3 AS a3, a4, a5
FROM qry_B;

UNION SELECT ALL a1, c2 AS a2, c3 AS a3, a4, a5
FROM qry_C;

UNION SELECT ALL a1, d2 AS a2, a3, a4, a5
FROM qry_D;

UNION SELECT ALL a1, e2 AS a2, a3, a4, a5
FROM qry_E;

UNION SELECT ALL a1, f2AS a2, tblG.f3 AS a3, tblG.f4 AS a4, a5
FROM qry_F;

One solution I came across when searching the forums was to use an Append Query to append the query results to a table and base my report on that. This does indeed fix the problem.

But what I was wondering if it was is my query design that is causing it to be slow or is it just the fact that I am returning 12,000 rows?
:confused:

In case it matters, I wanted to mention that I can’t use the report wizard to create the report. When I select the union query, the fields will be showed for awhile then they just disappear. That in and of itself doesn’t cause any trouble since I am creating the report using the design view and not the wizard.

View 7 Replies View Related

Reports :: Query Based On Linked Tables - Report Produces Multiple Copies Of The Same Record

Jul 22, 2013

My report produces multiple copies of the same record. I know why, but don't know how to fix it.

EmployeeTable.

With a one to many relationship with TrainingTable (via employee PK as FK in trainingtable).

Training table has a one to many relationship with a table called Range.

Report is based on a query that picks up the Employee/Training/Range (range just describes the training unit).

However, If I have more than one range expressed organized a training unit, the report spits out several copies of the Employee record to display all the ranges.

View 2 Replies View Related

Reports :: Hide Report Footer Based On Report Data?

Dec 21, 2014

How do I hide the report footer based on the report's data ?

I'm trying to hide if number of users = 1

The report's data is a query built inside the report's RecordSource, not a self standing query.

View 10 Replies View Related

Queries :: Differentiate A Query Based On All Group Records Or A Query Based On Only One Record

Dec 22, 2014

I have a combo named cbogroup. I have a tblGroup with several records (active, non-active, nursery, etc.). One of the records is *ALL*. Using the CboGroup the user can pick any of the records. Howeverr, if they pick the *ALL* record, I want the query to pull up animalID based on all records in the TblGroup. If another record is picked (i.e. nursery), then the query will pull up only animalIDs that are in the 'Nursery'.Can I put a (iff then) in a query in order to differentiate a query based on all group records or a query based on only one record?

View 14 Replies View Related

Chart Based On Form Based Parameter Query

Mar 22, 2006

Hi all,

stuck on this, not sure if it can be resolved....

I have a parameter query for which the parameter is based on a form field entry (i wanted to avoid the dialog box popping up).

No problems with this....however, I want to create a chart based on the same query however, i get the following error message because it does not recognise the query parameter.

Error Message: The Microsoft Jet database engine does not recognise '[Forms]![frmChooseDTDate]!DateOccured' as a valid field name or expression.

Can this be resolved?

Help most appreciated!

regards to all

K

View 2 Replies View Related

Report Back A Fee Based On Time

Jul 19, 2005

Hello.

I have been given a set of pricing tables in Excel that, based on the type of work done, show a dollar amount for time ranges. In other words, if WorkType = A, the appropriate pricing table is referenced and the amount of time in minutes is found within ranges ("0 - .3333", ".3333 - .6500", etc) shown in hour decimals (.3333 = 20 minutes), then an associated dollar amount is reported back. (I know... very awkward, but not my choice). The time ranges are not consistent in size either within a particular pricing table nor across tables. The person using these tables is doing this manually now.

What I need to be able to do is enter the WorkType and duration, and get the dollar amount from the table, even though the duration is not going to exactly match the value in the table. In Excel's VLOOKUP, you can put in amounts that not exact, and the function finds the highest value less than your entry. Can Access do that? I tried reading up on DLOOKUP, but I don't think that is what I need (or maybe I just don't understand it). I'm not sure of an efficient table setup or how to get the correct output.

Thanks for all your help!!

Tom

View 2 Replies View Related

07 Help! Generating A Report Based On Dropdowns

Mar 13, 2008

created a form with several Drop downs, S/N, Location, Manufacturer, Model, Model Number, and Owner.

All the drop downs are based off of forms, i queried the main inventory to have this info and a couple peaces of information. applied the relationships.

If i try to make a macro filtering the conditions, if i leave any of the fields blank nothing comes up in the search.

is there a VB code that i can use that wont include "null" fields or will this not work with 6 different filters applied all in one macro.

furthermore after the search i want the ability to print the search results using a report design.

is this possible?

View 2 Replies View Related

How To Run A Report Based On User's Options

Apr 12, 2007

Hello,

I need help with something (i attached a database).
I need to run a report based on user's options so i created a form. There are two comboboxes and 2 checkboxes on the form. If the checkbox is checked i want to consider the choice of the user on the particular combobox. If no, to ignore that column.
The second problem is when the user choose "no choice" i want the query to run for all choices without filtering the combobox.

Any suggestions?

Thank you in advance.

View 1 Replies View Related

Generate A Report Based On Value From Combo Box

Aug 29, 2011

I am trying to design a form which would have a combo box cbo1(Market) and a command button (btn1) to finally view a report based on the values selected in the combo box. The query (say qry1) that the report uses has about 11 columns, in which Market is one of them. And I have 8 different Markets. Now i need to be able to generate the report for two options:

1. I should be able to show the columns for the selected market ONLY(it need not be multiple selections; just one will do). Example: If I selected the Market 'Chicago', I want the report to display the column values for only Chicago.

And the other option is.

2. I should be able to show the columns for 'ALL' markets together. I dont actually have an option by name 'ALL' in the 8 values for market. I would like the combo box to show the option 'ALL' along with the 8 values in the list.

View 9 Replies View Related







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