By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,841 Members | 1,736 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,841 IT Pros & Developers. It's quick & easy.

Creating a Report from Subform

P: 4
Hi, hopefully people can help:

I am creating a rather simple database for a kids holiday camp. I have two main tables: tblLData (Leaders info) and tblKData (kids info).

What I have done is using a Query, combined two fields of the each table into one (Year Group & Group into GroupName).

Using these fields, I have made a form for the Leaders so that when they input the Year Group they are in charge with and the specific group, a subform would show the kids they have in their group.

Everything up to now is peachy.

Here is the problem:

I want to try and print the records from the subform into a report. I have created a Report which have textbox controls that have codes like this:

Expand|Select|Wrap|Line Numbers
  1. =[Forms]![Leaders Database]![LDatabase Qry subform].[Form]![Surname]
Obviously this one is to list the records first name.

The problem is that, when I click the command button to open the Report, the Report shows up and only displays the kid that is selected. This record is repeated until the page is filled.

If I select more than one record, it shows the first one and repeats that for the entire page.

How can I get the Report to show all the records in the subform and not repeat them?
Oct 7 '06 #1
Share this Question
Share on Google+
7 Replies


PEB
Expert 100+
P: 1,418
PEB
Hi,
So instaed this use

In () And btwn the brackets write a subquery that retrieves all Names in the sub form

:)
Oct 8 '06 #2

P: 4
Hi,
So instaed this use

In () And btwn the brackets write a subquery that retrieves all Names in the sub form

:)
As I'm very very new to SQL and databasing... I'm not exactly sure what I need to do to do this.
Oct 22 '06 #3

MMcCarthy
Expert Mod 10K+
P: 14,534

Here is the problem:

I want to try and print the records from the subform into a report. I have created a Report which have textbox controls that have codes like this:

Expand|Select|Wrap|Line Numbers
  1. =[Forms]![Leaders Database]![LDatabase Qry subform].[Form]![Surname]
Your problem is that this code will only reference the current selected record on the subform.

Instead design a subReport based on the record source of the subForm. You can then use that subreport on your report the same as you use the subform on your subform.
Oct 23 '06 #4

P: 4
As I said, I'm pretty new to this. I have absolutely no idea how to do this and only a general idea of what you are talking about.
Oct 26 '06 #5

MMcCarthy
Expert Mod 10K+
P: 14,534
As I said, I'm pretty new to this. I have absolutely no idea how to do this and only a general idea of what you are talking about.
Use the query or table behind the subform to create a new report. Then drag a sub report control from the toolbox on to the main report and follow the wizard.
Oct 27 '06 #6

P: 4
It doesn't seem to filter.

There's two controls that filter the subform. At the moment, it filters it well.

When I followed the instructions, the subreport just showed all the data rather than the filtered ones.

BTW: I made a subform exactly the same way on another form, but for the second one I needed to refresh the page before it showed...any advise?
Oct 28 '06 #7

PEB
Expert 100+
P: 1,418
PEB
Can you enter in the query design of your query for your subform and choose

SQL view

The the text that appears there to copy it and paste it here in the forum

So we can understand better what happens in your subform and why it isn't able to appear in report

:)
Oct 28 '06 #8

Post your reply

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