Open Report Based on Query

I have a report based on a Query.  In the Query's criteria On one field I 
have this
=Forms!frmCheckAction!TxtSalesID
How do I open this report based on this query from a different form?  Do I 
leave the Query criteria blank?  I'm getting confused!
Thanks
DS 


0
DS
3/17/2007 8:55:03 PM
access.reports 4434 articles. 0 followers. Follow

3 Replies
1414 Views

Similar Articles

[PageSpeed] 45

Change the way you open the report so you can open it from different forms
Use the WhereCriteria of the open report command line, living the 
RecordSource without a criteria

Dim MyCriteria As Text
MyCriteria = "[FieldName] = " & Forms!frmCheckAction!TxtSalesID
Docmd.OpenReport "ReportName",,,MyCriteria

From the other form, set a different criteria, or open without a criteria

Docmd.OpenReport "ReportName"

Mybe this link will provide you with a different example

http://www.databasedev.co.uk/report_from_form_record.html

-- 
Good Luck
BS"D


"DS" wrote:

> I have a report based on a Query.  In the Query's criteria On one field I 
> have this
> =Forms!frmCheckAction!TxtSalesID
> How do I open this report based on this query from a different form?  Do I 
> leave the Query criteria blank?  I'm getting confused!
> Thanks
> DS 
> 
> 
> 
0
Utf
3/17/2007 8:50:15 PM
I have tried this simple step and the report does not even open. Have spent 
over an hour and nothing. 

DoCmd.OpenReport "rptEmployeeDetails", acViewPreview, , _
                 "[lngEmpID]=Forms!frmEmployee

"Ofer Cohen" wrote:

> Change the way you open the report so you can open it from different forms
> Use the WhereCriteria of the open report command line, living the 
> RecordSource without a criteria
> 
> Dim MyCriteria As Text
> MyCriteria = "[FieldName] = " & Forms!frmCheckAction!TxtSalesID
> Docmd.OpenReport "ReportName",,,MyCriteria
> 
> From the other form, set a different criteria, or open without a criteria
> 
> Docmd.OpenReport "ReportName"
> 
> Mybe this link will provide you with a different example
> 
> http://www.databasedev.co.uk/report_from_form_record.html
> 
> -- 
> Good Luck
> BS"D
> 
> 
> "DS" wrote:
> 
> > I have a report based on a Query.  In the Query's criteria On one field I 
> > have this
> > =Forms!frmCheckAction!TxtSalesID
> > How do I open this report based on this query from a different form?  Do I 
> > leave the Query criteria blank?  I'm getting confused!
> > Thanks
> > DS 
> > 
> > 
> > 
0
Utf
6/13/2007 10:27:00 PM
The path to the feld in the form doesn't include the field name

DoCmd.OpenReport "rptEmployeeDetails", acViewPreview, , _
                 "[lngEmpID]=Forms!frmEmployee![FieldName]"

Have a look in the link I provided you with in your previous post

http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.access.queries&mid=b2c61e99-4d2c-469c-a68b-7bfeaa9d58e7

-- 
Good Luck
BS"D


"TKM" wrote:

> I have tried this simple step and the report does not even open. Have spent 
> over an hour and nothing. 
> 
> DoCmd.OpenReport "rptEmployeeDetails", acViewPreview, , _
>                  "[lngEmpID]=Forms!frmEmployee
> 
> "Ofer Cohen" wrote:
> 
> > Change the way you open the report so you can open it from different forms
> > Use the WhereCriteria of the open report command line, living the 
> > RecordSource without a criteria
> > 
> > Dim MyCriteria As Text
> > MyCriteria = "[FieldName] = " & Forms!frmCheckAction!TxtSalesID
> > Docmd.OpenReport "ReportName",,,MyCriteria
> > 
> > From the other form, set a different criteria, or open without a criteria
> > 
> > Docmd.OpenReport "ReportName"
> > 
> > Mybe this link will provide you with a different example
> > 
> > http://www.databasedev.co.uk/report_from_form_record.html
> > 
> > -- 
> > Good Luck
> > BS"D
> > 
> > 
> > "DS" wrote:
> > 
> > > I have a report based on a Query.  In the Query's criteria On one field I 
> > > have this
> > > =Forms!frmCheckAction!TxtSalesID
> > > How do I open this report based on this query from a different form?  Do I 
> > > leave the Query criteria blank?  I'm getting confused!
> > > Thanks
> > > DS 
> > > 
> > > 
> > > 
0
Utf
6/13/2007 10:38:03 PM
Reply:

Similar Artilces:

when i open an attachment it just shows a box i cannot open
Attachment, whether docs or pictures won't open. I can preview them inside the window pane, but then have to copy to word doc to print. Should be able to open attachment and then print just from there. Please help. It's like the Microsoft Picture manager is working strangely. ...

report disappeared
I was trying to run a Documenter report showing all object permissions. It had an error so didn't complete the report. Now when I try to do it again I get an error that says "Table 'doc.tblObjects' already exists" but I can't find the report anywhere. Where would it be? It should be where ever your Word has for default file location - maybe My Documents.' When you get that message just let Access overwrite it with the latest report. -- KARL DEWEY Build a little - Test a little "Kim" wrote: > I was trying to run a Documenter report showing all...

Opening a paramater form when open a report
I have a repor that takes date parameters from a seperate form.. As it is now I have to open the form put in the paramaters and then run the report which is based on a query... I would like to have the form pop up when I open the report and then close once once the report has run.. Help Please And thanks in advance bob On Wed, 15 Aug 2007 11:56:00 -0700, Bob wrote: > I have a repor that takes date parameters from a seperate form.. As it is now > I have to open the form put in the paramaters and then run the report which > is based on a query... > > I would like to ...

How do I get my MS Pub 2000 to open Pub files from Pub 2003?
i cannot get my Publisher 2000 to open files from Pub 2003....do i have to buy Pub 2003? or is there a solution that I can download? I have already disabled my antivirus and that didn't do anything.. also my files are not "read only". pls help. thx. Novice Novice <Novice@discussions.microsoft.com> was very recently heard to utter: > i cannot get my Publisher 2000 to open files from Pub 2003....do i > have to buy Pub 2003? or is there a solution that I can download? I > have already disabled my antivirus and that didn't do anything.. also > my files ...

Publisher 2000
After I open the Publisher 2000 program and attempt to open a file or create a new document, I get the message "Microsoft Publisher 2000 Version 6.0 has encoountered a problem and needs to close. WE are sorry for the inconvenience". I tried repairing the program and even reinstalling it, but that did not correct it. Suggestions? If you are trying to use Publisher on a network - don't it is not intended for a network Publisher files have to be worked on and saved to the local hard drive ONLY. -- Hi tom (tevanz@bellsouth.net), in the Microsoft� newsgroups you posted: ...

Microsoft CRM Reporting Services DateTime Parameter
Hello, I've built a report for a client using Reporting Services in VIsual Studio 2005. The report is viewed in CRM 3.0. I have, among others, 2 parameters that are using DateTime format. The client would like to be able to enter parameters for not only date, but time of day as well. As of right now, the parameter control only allows them to enter a date. I have been unable to find a way to expand the selection to include the desired time of day to the parameter. Is this even supported? Thanks, CJ ...

opening links in outlook
why i can not open links attached to my e-mails mike wrote: >why i can not open links attached to my e-mails > I think you did some mistake in typing so just do one thing first type the link in notepad and then direct copy and paste that in your mail. -- Stellar Information Systems Ltd. D18, Sector-33, Infocity Phase II, Gurgaon-122001 Phone : (0124) 326 6069, 432 6700 Website : http://www.stellarinfo.co.in/ What happens when you try? Do you get the error; "This operation has been cancelled due to restrictions in effect on this computer" See http://www.m...

Restarting Record Count in a Query
Hello, I have a query that returns these results for me: Badge No DepLastName DepFirstName 11111 Smith Mary 11111 Smith Joe 22222 Brown Bill 22222 Brown Mary 22222 Brown Jack I need to count the dependents that are linked to each Badge No so my results look like this Badge No Count DepLastName DepFirstName 11111 1 Smith Mary 11111 2 Smith Joe 22222 1 Brown Bill 22222 2 ...

Problem trying to open old money file
Hi, I am trying to open a four-month old money file, which was on my backup disk. It is a *.mny file, not a backup file. It was created using the same version of Money (2005) which I still use. When I start MS MONEY and try open my old data file, it tells my that it wants convert my file so it works with this version. (Not sure why as the file was created in this version of MS Money). Then when I try and carry out the conversion it gives the following error message. "Money cannot locate xxxx or cannot open it, possibly because it is a read-only file or you do not have...

Running Virus Scan Slowing down opening files
3 minutes to open files in excel and word Are you using kaspersky virusscan? It is know for it. If yes please ask you administrator to exclude scan on harddisk or network files in the settings. -- Arien ------------------------------------------------------------------------ Arien's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1892 View this thread: http://www.excelforum.com/showthread.php?threadid=390878 All Virus Scanning can be stopped: If your using Norton Follow the below if you want to open documents much faster Open Norton Click on: Norton Interne...

Email with tiny attachments open slow
Good Day All, I am using Exchange server 200 and Outlook 2003 mail client. I have started to experience with a single machine where all of a sudden reading emails with attachments of any size, even 6k, slows greatly. Just selecting the email item in the list takes at least 30 seconds before the lower pane shows the body of the selected item. No other client has the same problem even while this machine does. The problem seems to disappear at some point and then returns. The machine was connected to a 10Mbps switch so I changed to a 100Mbps switch and Event logs reveal nothing. I have ...

Need an open house sign in sheet
Need an open house sign in sheet That's interesting, but do you have a question about Publisher? -- James Bart: "According to creationism, there were no cavemen." Homer: "Well good riddance, their drawings sucked and they all looked like hippies!" "soozeeque" <soozeeque@discussions.microsoft.com> wrote in message news:1096B15B-9766-4573-9FC2-2053BEC1F34B@microsoft.com... > Need an open house sign in sheet I would suggest keeping it simple. Use a table for the visitors' information and maybe your real estate company's logo...

cannot open excel file from outlook
Excel 2007 cannot open document eithout first saving and opening thru excel Try to re-register Excel. Close Excel first and On the Windows Taskbar Start>Run "excel.exe /regserver"(no quotes)>OK. See the space between exe and /regserver You might have to designate a full path to excel.exe. In that case Start>Run "C:\yourpath\excel.exe" /regserver(quotes required)>OK Gord Dibben MS Excel MVP On Wed, 27 Jan 2010 11:38:12 -0800, Rick <Rick@discussions.microsoft.com> wrote: >Excel 2007 cannot open document eithout first savi...

opening links
Whenever I try to open a link in Outlook XP -- (Win XP Pro) it opens a "open with" prompt/box. Point it to the .exe for your preferred browser and click okay. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the Swen virus, all e-mails sent to my actual account will be deleted w/out reading. After searching google.groups.com and finding no answer anonymous@discussions.microsoft.com <anonymous@discussions.microsoft.com> asked: | Whenever I try to open a link in Outlook XP -- (Win XP | Pro) it opens a "open with&quo...

report definition not valid
Good Afternoon. I have been getting this error recently. "The report definition is not valid. Details: The report definition element 'ConnectionProperties' is empty" Every time I make changes to the report and save it, an incomplete ConnectionProperties element is added back to the rdl as follows: <ConnectionProperties> <ConnectString /> <IntegratedSecurity>true</IntegratedSecurity> </ConnectionProperties> If I remove this element and run the report, it works again until I make another change to the re...

Purchase Request Resolution Report contains no data
Our user would like to print all the items listed in Purchase Request Resolution Grid but when we click on the Print button the report doesn't bring up any data. Any idea? Speedy, The report attached to the print button on Purchasing Request Resolution contains the "Actions" that were taken on items in the window. For example. Action Performed PO Number Vendor ID Vendor Name Vendor Item Number Item Number Item Description Quantity Ordered U of M Site ID Due Date =================================================...

SQL Query Problem
Hi there, Ive created a sql query that will be returned to an microsoft excel spreadsheet. The problem im experiencing is that the schema names are not presented in the right columns on the microsoft excel spreadsheet. Is it possible if anyone could tell me what is causing this problem? below is the SQL query SELECT quote.owneridname, quote.customeridname, quote.new_agency,QuoteCreatedOn = Convert(varchar(10), Quote.CreatedOn, 101), quote.name, quotedetail.priceperunit, quotedetail.new_loading, quotedetail.new_subtotal, quotedetail.new_mandiscount, quotedetail.new_subtotal1, quotedetai...

unable to open your default mail folders...
I am running XP Pro and Office XP 2002. I currently use Outlook express on this PC but want to switch over to Outlook. When I try to open Outlook I get the message- Unable to open your default mail folders. Could not open item. Try again. Any ideas what's going on ??? Thanks in advance!!! -- Dennis Have you created a mail profile and installed your mail account(s)? -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. ALWAYS post your Outlook version. How to ask a question: http://support.microsoft.com/KB/555375 After furious head scrat...

Workbook always opens at a specific sheet and cell
I have a workbook consisting of many sheets. How do I make sure that everytime I open the work book, it would directly point to a specific sheet and cell? Hi put the following code in your workbook module (not in a standard module). sub workbook_open() me.worksheets("sheetx").activate end sub -- Regards Frank Kabel Frankfurt, Germany Zee wrote: > I have a workbook consisting of many sheets. How do I make sure that > everytime I open the work book, it would directly point to a specific > sheet and cell? methinks the original poster also wanted to activate a particu...

How to setup GP for asset based lending and factors
We are financed by Asset Based Lending program through a Factor and are having a very difficult time figuring out how this would be setup and represented and accounted for in GP because we don’t deposit payments into our bank of America account, rather they collect all our payments and advance us funds. Basically works as follows: We receive availability of funds from 80% of eligible domestic sales under 90 days. All the checks that our customers send for payments are sent to our factor/financier and they deposit the checks into their account not ours. From the payment collections, w...

EXCEL Files open Slow
Why is it that when I open associated files for Office 2007 (.xlsx and ..docx) that they open SLOW (approx 15 seconds). However, if I have Excel or Word open and then attempt to open specific files, they open in a snap ? I have Office 2007, Vista Home Prsmium, a 2.4 Quad Core system, and four gigs of ram. Can someone please explain this and help me out ? Thanks. Hi, If I get your point - when you open the files in the Window Explorer (outside of Excel) it takes longer. Sometimes that if because Excel needs to launch, and that can be slower than just opening a file from inside of Excel...

Directory Open
Hi, I would like to create a Button which opens a dialog box, not to open a file but to open a directory. How should I do it? I thought of using CFileDialog but it does not allow for opening just a directory and not a file. I just want to read in the user selection of directory and the file name will be set in my application. Thanks! On Wed, 17 Dec 2003 22:15:36 -0800, Dave wrote: > I would like to create a Button which opens a dialog box, > not to open a file but to open a directory. > > How should I do it? > I thought of using CFileDialog but it does not allow for ...

Access query
I have a access query that I would like to show in my excel spreadsheet. Is there a way to insert? In the destination workbook, choose Data>Import External Data>New Database Query Click on MS Access Database as the data source, and click OK Select the database with the list, and click OK In the Query Wizard, select your query, and click the > button, to add the columns to the query Click Next, three times, then click Finish. Select a starting cell for the imported list, and click OK Right-click a cell in the imported list, and click Data Range Properties Add a check mark to R...

Crystal Reports, delete?
Is it possible to delete a report? I'm using CR 8.5 and after looking through both the CRM/SQL servers I can't find where its being stored, much less how to delete one. -Gary ok, I found where it stores it, but after deleting the ????.rpt file I wanted it doesn't go away in CRM. -G "Gary" <gary.rey@NOOOOSPAM.virtium.com> wrote in message news:eWSCzujfDHA.2152@tk2msftngp13.phx.gbl... > Is it possible to delete a report? I'm using CR 8.5 and after looking > through both the CRM/SQL servers I can't find where its being stored, much > less how to...

Modify report to print individual group of records on separate pag
I am new to report writer and I am trying to figure out how to print individual employees records separately. It is an employee training records report where it group all of an employees training classes together. However, unless it fills the page, the next person's records are printed and I'm trying to start each new group on a new page. I don't know where to find the group properties. Please help. Amytdev. I think you need to create an additional footer. The additional footer can have the "Page Break" option set, causing a new page to be started. Below is the p...