Query As Report Source

Aug 11, 2006

Hi

I have o form based on a query that I can search in for last name etc.
And then I have a button for opening a report for the person that displays.

Here is the problem now:
If I have two persons with the same last name I get a report of several pages also showing the person that is not displayed in the form but have the same last name.
What can I do in the query just to get the person only on display showing on the form?
ID is the primary key

Mikael

View Replies


ADVERTISEMENT

Change Report Query Source

Dec 19, 2003

I have designed a report that took ages to do the layout etc for.

Now I just want to use that as a template and just alter which query it gets its parameters from.

I can't for the life of me figure this one out

Any help would be very much appreciated

View 5 Replies View Related

Reports :: Record Source Of REPORT Other Than Query

Aug 27, 2013

Everytime i make a report in Access, first thing i do is build a query and then use it as a record source. I try the other way, I go to create report design directly and do the drag and drop of fields.

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

Control Source In A Report

Sep 9, 2004

hey

i really hope someone could help me with this, i have a query (Exp Query) which calls from 2 tables Expenditure and VAT.

My VAT table lists all the VAT Months and their relative Quarter Number, VATMonth is the primary key but because it contained other text, i had to make it a text value rather than format it as a date. so the problem is when i make a report, it sorts the VATMonth in alphabetical order, eg June 2004,July 2004, May 2004.

my VAT table has an ID field which is an autonumber, so i use that to order the list in things like my drop down box on a form. so how can i do the same thing in my report.

the report consists of 3 months which i need to SELECT VATMonth FROM Exp Query and ORDER BY VAT.ID (also from Exp Query) can i do this and if so could someone tell me how it would be written, i just keep getting syntax errors.

thanks for any help,

Baz

View 4 Replies View Related

Report Control Source

Sep 28, 2004

I am trying to get Access to print out a field that is city, state, zip except when no city is set.

My control source criteria is =IIf([City] Is Null," ",([City] & ", CA " & [Zip Code])) I've tried IsNull([City]) instead of [City] Is Null to no avail. All I get in the box is #error. I can get just [City] or just [Zip Code] to work but even if I just put in =[City] & ", CA " & [Zip Code] I still get #error.

Please help! I just got my hair cut so I don't have that much to pull out.

View 3 Replies View Related

Open Report Without Having Recod Source Set

Jul 7, 2005

I have a form with three combo boxes and am looking to open a report based on the choices they make. After each combo box is selected a query is run that makes a table based on their choice. I want to be able to use the appropriate table, without having to set it each time. The data displayed is going to be the same on the report just different data. Any help would be greatly appreciated.

Thanks

Bobby

View 5 Replies View Related

Control Source On Report Won't Change

Sep 10, 2004

I have a report with subreports contained in it. Each subreport gets it's data from a different table.

I noticed subreport 1,2,3,4 are pulling the data from their corresponding tables. However, subreport 5,6, and 7 are pulling their data from the table relating to subreport 1.

I've checked the subreports themselves. They are referencing their own tables if I open them individually but not when opening the main report.

The report names all seem to be correct.

I've never seen anything like this before. Does anyone have some ideas??

Thanks.

View 2 Replies View Related

Report Problem With Control Source

Oct 5, 2004

Hi,

I am new to Access and am learning the ropes.
I have constructed a basic database for our Church Craft Fair.
It consists of two tables, one for suppliers the other for inventory.
The tables are linked with a one to many rule and each has a key field
of Supplier ID. I have a form for entering Supplier details and another
for entering Inventory which has a subform. It all seems OK.
I have used the wizards and then customised to suit.
The problem I have is that I need to have a report of items sold with their value.
I have done this with the wizard generating the report from the inventory table.
However I also need to include fields from the Customer table, such as supplier name
and tax details. I have tried to include these fields by entering the control source
from the Customer table using the expresion builder[customers]![SupplierName] but this
just generates an error on the form #Name?. I have also tried launching the report from
a form based on the customer table and using the customer data on the form as the control source.
This does not give errors, but the data is incorrect and only relates to the first customer record,
ie on the inventory list for each customer, every customer has the first customers name.
Can anyone help me with this?
I have spent hours trying to work out how to do this correctly.

Cheers
Cotech.

View 2 Replies View Related

Change Record Source On Report

Jan 14, 2005

OK. I have a report that I want to use as a master and use with about 4 different querys. In the report properties I've bound it to a query. I've tried for ages to change the record sources with on click command bottons on another form. I think things have become complicated because there's a subreport on the report I AND a there's bunch of code to make things invisible in the on page event of the report.

anyway, here's what I'm using:

DoCmd.OpenReport "rpt_master", acViewPreview
Me.RecordSource = "qry_rptPrintRollClass"

Is this the right way to do it??

Any ideas on how I can clean it up??

Thanks

Damon

View 2 Replies View Related

How To Change The Record Source Of A Report From A Form

Sep 22, 2005

I'm looking to change the record source of a report and then print the report depending on what button the user clicks on.

Is there some way to do this?

View 8 Replies View Related

Reports :: Combine Two Queries Into One Report Source

Feb 27, 2015

I have a database that reports activities by region.

Each week, my regional volunteers report statistics on a number of club activities. This is in the form of zero to theoretically infinite activity reports that they enter on a website. I download the .csv from the website, add the activity reports to the activity table and send them a totals summary every now and then.

The summary report shows figures for every club in the region, even if no activity reports have been entered for that club that week or ever.

This works fine, including forcing the query to return zeros when no reports have been submitted for that club.

What I want to do is have the report also show (in brackets next to each figure) the position as it was X number of days previously.

I can make the query and report to show the figures now.

I can make the query and report to show the figures X days ago.

What I cannot work out is how to combine the two queries into one report source so that I can get

Club 1 100(50) 75(0) 45(45)
Club 2 0(0) 0(0) 0(0)
Club 3 20(19) 0(0) 200(50)

etc

If I try and make a third query that gets the sums from qryNow and the sums from qryXdaysago for each record in qryClubsByRegion, I get two lines for each club.

View 7 Replies View Related

Automate Import Of Daily Report From Another Source

Oct 30, 2014

The multi-user application I'm making uses data from another system. I get reports in csv format e-mailed to me in zip format. Since it's a multi-user system, I have to create a table with the records from the csv I get an error message that someone is viewing the data if I try viewing it while someone is viewing it.

When I get the e-mail with the latest version of the csv, I unzip it and replace the older file in the folder location that the Access database is linked to. I have a sub routine that deletes everything from the table and inserts the records from the latest csv. I execute the sub by pressing a button.

Is there a way to automate unzipping the file, extracting it to the folder and running the sql code in VBA?

View 2 Replies View Related

Reports :: Capture Value Via Textbox Or Any Source For New Blank Report

Jul 7, 2013

I have a report in access 2007, now i need to ask that i am creating new blank report and just like to to capture value from other report via textbox or any source (you may reccommend), for e.g in Report A i have months and their total amounts now i want to add both these fields in new Report B where i will do the same with other previous reports to create summary of accounts.

View 1 Replies View Related

Reports :: Passing Variable To Report Record Source?

May 7, 2013

I have a subroutine that successfully builds a SQL statement "strSQL", which is a public variable.

Using msgbox, I can read that the value is correct -
SELECT * from tblIncidents WHERE [Nature] = 'Hover';

(The select statement may be complex, e.g. [Nature] = 'hover' AND [COLOUR]= 'Blue' AND [GRADE] = 'High')

I want to pass the variable strSql to my report rptIncident in the following command:

Private Sub CmdPrintReport_Click()
If Right(strsql, 1) <> "'" Then 'check if statement was built
Else
strsql = strsql & ";" 'add trailing ; to statement
MsgBox strsql
DoCmd.OpenReport "tblincidents", acViewNormal, , strsql
End If
End Sub

I get a flashing error, then runtime error 3075 - |1 in query expression '|2'.

View 6 Replies View Related

Reports :: Set Record Source Of Report From Button On Form

Jun 13, 2014

How can I set the record source of a report to a saved query through VBA. I am trying to use the same report for a number of uses, all of the info on the report is the same, but the only difference is the query that the information is based on. I have this simple code below, how do I add a record source to it (if it can be done)

DoCmd.OpenReport "SellRPT", acViewReport, , , acNormal

View 2 Replies View Related

General :: Record Source TblName Specified On Form Or Report Does Not Exist

Aug 21, 2012

I have an application written in Access 2007 and packaged using the Packaging Solutions for deployment with Runtime.My problem is that I've written an updated version, and after carefully saving my original Back End away from the install site, uninstalling Runtime and the FE, installing the new FE with a blank copy of the BE having the same name and Runtime, and copying the filled BE into the same folder with the FE (replacing the linked, but empty, BE) I find that SOME of my tables in the BE are not being recognized. This isn't true of all tables. I can open some of the forms and find everything there. In other cases I get the following error message "The record source "tblName" specified on this form or report does not exist."

View 2 Replies View Related

Modules & VBA :: Creating Recordset - Using Array As Report Data Source

Apr 17, 2015

I've done some basic work with arrays.. writing array data to form list objects.. How to use an array as a data source for a report?

Would i need to create a recordset and populate it with the array, then bind the report to it ?

The reason I am asking is the previous developer here built every app using arrays and UDT's... the apps are completely disconnected from the data. Everything is loaded in to arrays..

View 2 Replies View Related

Reports :: Setting Subreport Source Object To A Report In A Collection

Apr 6, 2013

I am trying to join a number of reports into one report. I have a generic report which displays a different dataset given the user's choice on a form. I created a collection where I can store multiple instances of this report (called mcolReportInstances) - this works just fine.

I was looking to combine all the reports in the collection into one report. To that end, I have created a report with a number of subreport controls but with no sourceobject. In the On_Open event of this blank report, I am trying to set the source object of the subreport to one of reports in my collection:

Me.Controls("Child" & i).SourceObject = mcolReportInstances.Item(strKey)

However, it keeps giving me the error 'Type mismatch'.

View 10 Replies View Related

Reports :: Training Database - Group Report By Field List Row Source

Oct 30, 2014

I am in the process of creating a training database that includes levels of proficiency with certain tasks for employees.

In one of my reports I would like to appropriately display with tasks the employee "Cannot Perform";"Can Perform with Assistance";"Can Perform Alone";"Trainer" (straight from the field list of the task). But I can't seem to get the hierarchy correct. Tried it in a PivotTable too as I thought similar to PTs in Excel you could get some kind of "count" of values. Couldn't make that happen either.

Each employee has a proficiency rating on about 20 different tasks. Proficiency input is controlled by a field list. I would like to structure this part of the report like so:

------------------------------------------------------------
EMPLOYEE PROFICIENCIES
--Cannot Perform Task
----Cutting
----Trimming
----Grinding
--Can Perform With Assistance
----Painting
----Fixing
----Drilling

etc. etc. So in this case the Field itself would become the value being grouped. I know there has to be some logic either in a query or SQL.

View 2 Replies View Related

Remove Record Source/Control Source

Sep 19, 2005

I have an unbound form with three tabs. On each tab there is a sub form. Each tab is a search form and each sub is a results returned. I have made everything unbound and set the sub form recordsource and its controls control souce on afterupdate of the main form search criteria. Works fine except for after some use the db decides the sub forms are not unbound and sets the record source and control sources.

I'm trying to do a

Me.PollingPlacesResults.Form.RecordSource = ""
Me!PollingPlacesResults!PollID.ControlSource = ""


but this does not seem to work in actualy removeing the record source and control source.

View 14 Replies View Related

Queries :: Opening Design View Of Append Query Without Timing Out Source Query

Mar 4, 2015

In some cases I create pass-through queries and use these in an Append or Make-table query to bring data locally.

All is well and fine until source data changes and the pass-through query runs too long and times out.

If needed, I can extend the timeout value in the Parameters of the pass-through query no problem, but when I try to open the Append or Make-table query in Design view to do the same, the pass-through query is first triggered and then throws the timeout, and I cannot access the Design view of the Append or Make-table

Is there a way to open an Append or Make-table query in Design view without invoking the source query?

View 1 Replies View Related

Queries :: Crsosstab Query Doesn't Recognize Expression In Source Query

Aug 12, 2015

I have a query where these are the fields:

ProductRevType
RevLag
RevFlowThru
CloseMoYr
ProjRevDate
CurrentMRC
ProjRevMRC

The ProjRevMRC field is an expression that reads:ProjRevMRC: IIf([ProjRevDate]>=DateSerial(Year(Date()),Month(Date()),1),[CurrentMRC]*[qry303a_ SFADetailMRC_ONLY]![Rev Flow Through],0)

When I run the query, it works perfectly, but when I created a crosstab query to show totals by month, I wanted the totals to be zero for the months less than the current month. Is there a way for the crosstab query to execute the expression and put zeroes for those months?

View 4 Replies View Related

Queries :: Query Error When Data Changes In Crosstab Source Query

Aug 12, 2014

I have a database which among other things records how jobs are received i.e.: Telephone, Email, Mail, Facsimile or Web.For each client I want to identify the percentages of each method of receipt against the total of jobs received and during different time periods.I have created a make table query for all jobs received between variable dates for a client entry of the name of the client and the start and finish dates are required to run the query.

I have a crosstab query set up to count each method of receipt and a final query to work out the percentages using the total from the crosstab query fields divided by the total of all methods.I have a macro set up to replace the table with new data when I want the stats for a different client between new dates, therefore the different methods of receipt may vary for the less active clients i.e.: they may only have telephone and email .

My problem is if I choose a client where we have not received a job by a particular method (say web or facsimile), the last query working out the percentages has fixed names to cover each method but naturally produces an error when it cannot find a corresponding method of receipt. I have experimented with NZ() without success.My question is can I either have preset standard names of the column field in a crosstab query? Alternatively in the query calculating the percentages, can I include code to ignore a non-existent field in the crosstab query.

View 9 Replies View Related

Need Help With SQL Query For Row Source

Feb 13, 2008

Hi!

I have those (simplified) tables that are linked with an n:m relation

persons:

#ID#FullName#

trainings:

#ID#startDate#

training_members:

#ID#trainingID#personID

Now I created a form to fill the training_members table with the participants. For the form I'm using a dropdown list filled with the names of the people from the persons table. What I now want is that the dropdown list only shows the values that are not already used before. So I changed the SQL statement of the row source property:

SELECT persons.ID, persons.FullName FROM persons WHERE persons.ID Not In (SELECT personID from training_members inner join trainings on training_members.trainingID = trainingsn.ID) ORDER BY persons.FullName;


I also added "me.recalc" to the after_update event of the dropdown list.

It does work - but there's one problem left: The SQL query doesn't include the just selected value. Because only values that are included in the list are accepted, the name of the person isn't shown in the dropdown.

Do you know how I can update the SQL statement so that the just selected entry is as well mentioned in the list? The abovementioned form is displayed as "Continuous Forms", so I don't know if it is possible to access the recordset the dropdowns are located into...

Thank you in advance!

View 1 Replies View Related

Multiple Source Query

Jun 26, 2006

I'm in the process of learning to use Access and I would appreciate any help that can be provided. The problem that I am facing is that I have data in three different columns, and this cannot be changed. The database that I am creating links to another database to retrieve a table. This table contains two columns of data that are essentially the same for my purposes. I have also created a new table in my database which houses new data and also this will be the location where new records are be stored. Ideally what I'd like to have is a single table with the information from the three sources stored in a single column that updates as the linked table is changed. Is there a way to do this with a query? or should I be looking into another method? Any help is appreciated. Thanks.

Would the append option be appropriate?

View 3 Replies View Related







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