473,386 Members | 1,803 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to filter report based on records shown in a sub form?

374 256MB
Hi all,

This would normally be quite simple however for some reason I can not getting working.

My code to open my report filtered to a primary key is as follows:

Expand|Select|Wrap|Line Numbers
  1. Case "Full record"
  2. DoCmd.Close acForm, "frmHowToReport"
  3. DoCmd.OpenReport "rptPrintLog", acViewPreview, , "[NCC_ID]=" & Forms![frmlogforfiltering]![subfrmlogforfiltering].Form![NCC_ID]
  4. DoCmd.Maximize
  5. DoCmd.RunCommand acCmdFitToWindow
However, the sub form subfrmlogforfiltering has a recordsource of a query which within it contains the primary key of my main table.

I use a search which filters the subform down to records I require.

I want to be able to print these records out, however the current data shown is only an overview. My report contains all the information behind each of those records (the whole record info).

How do I pass a filtered subform who's recordsource is filtered from a query to a report...


When I submit the above code all that is returned is 1 record, sometimes there are more than one record returned, but the report still only shows the first.
Nov 30 '10 #1
0 998

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Richard | last post by:
Hi, I have a form based on a table. When I filter the form I want to run a report based on the same table with the same filter as the form. No problem until I want to filter a combo box where...
4
by: No Spam | last post by:
Dear Access 2000 users, I have a crosstab query that puts together certain information perfectly. It has a criteria that is based on a form that limits how many columns are returned based on...
0
by: Richard Hollenbeck | last post by:
I have a crosstab query that shows all the scores of all the activities of all the students in all courses, with the students being in the rows and the activities being in the columns and the...
2
by: Rosy | last post by:
I am attempting to use the following code to print a report based on the current record in the form. Users bring up the record with a parameter box and then can make changes to the sub-form on the...
8
by: | last post by:
hi, i have a form on which a user can choose specific criteria such as dates etc, in order to filter the report that is called from the form. i do this by using the Where section of the...
0
by: mike11d11 | last post by:
I have a form with a dataset that contains account records in one table and another table that contains transactions for accounts that are in the other table. I'm trying to create a report based...
5
by: jonosborne | last post by:
Hi, i have managed to filter a report based on selections made in a list box but am totally confused with a message box that appears everytime i run my report. Let me explain (i apologise for...
1
by: zoro25 | last post by:
Hi, I created a report based on a crosstab query and I need to add some filtering either in the report or in the query but can't find how to do it. For example, my report contains Site Name,...
1
by: Joyfully | last post by:
I and a new user of MS Access 2003, and I need help with a report created from a form. I created a form that data is inputed weekly. I created a report to display this data in putting only the...
3
by: NMarks | last post by:
Hello, I currently have a continous form that has a search field in the header. The search works without issue, but I want to be able to print a report based off the search results. All the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.