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 Replies


ADVERTISEMENT

Modules & VBA :: Open Filtered Form With Record Source Set

Dec 17, 2013

In my Access adp, when I open a certain form (frmVertebrates), the databinding occurs in the Load event for the form, for various reasons. I have not specified any datasource in the form's design view.

Databinding for frmVertebrates:

Code:
Me.Form.RecordSource = "select * from dbo.vertebrates where catalogID=3"

This works great when just opening the form. However, when opening with a filter from a button on another form it won't work, the form displays all records.

Button code:

DoCmd.OpenForm frmVertebrates, , , "vertID=123"

Obviously, this makes sense, since the record source is explicitly set in the Load event.

Is there a way to capture the filter "vertID=123" so it can be added to the Form.RecordSource sql?

When breaking in the Load-code and watching the 'form' variable, I can't spot the filter condition anywhere...

View 4 Replies View Related

Reports :: Can Create A Date Parameter Box Open Up / When Open Report

Sep 21, 2014

I have a report based on a query that has data for many dates. At the moment I have put a specific date in the criteria of the query so that I could build the report format. So it now displays all the data for the date i have in the criteria section. I will need to run this report several times per week so the specified date (and corresponding data in the report) will need to be changed to a new date when I open the report i.e. when I open my report I want to show data in the report only for a specified date.

Can I create a date parameter box open up when I open the report? Can I create a form with a button that when I click will open the report displaying data for that date? What would be the best way?I also need to display the specified date on the report.

View 5 Replies View Related

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

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

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

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

Forms :: Open Report Button To Select Data From 7 List Boxes And Present In A Report?

Aug 13, 2015

I have a form with 7 List boxes linked to 7 Query's which in turn are linked to a table. Each list box if for a particular trade.

I am trying to select a person or persons from each List box and then have them sent to a report. I have Code to do one list box, but do not know how to link all boxes with code to a 'Open report' button.

The code I am using is as follows:-

Private Sub cmdOpenReport_Click()
On Error GoTo Err_cmdOpenReport_Click
Dim strWhere As String
Dim ctl As Control
Dim varItem As Variant
'make sure a selection has been made

[code]....

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

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

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

Open Report

Oct 11, 2006

Hello friends,
I would like to add a cmdbutton on a form to view a report.
This report should also include the last modified data of my form. Is it possible to see the data without closing the form?
Or perhaps there is a solution like close the form and open the report (it will use the field SSN as PK) of the last modified (or viewed) recordset?
Any help or code will be appreciated.
Thank you.

View 1 Replies View Related

Can't Open Report

Jul 23, 2007

I have an Access 2003 database that has a report which prints to the default printer.
We recently replaced the printer and now we cannot open the report in either design or preview.
How can I resolve this problem??

Many Thanks,
DL

View 4 Replies View Related







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