Sub-form header repeats on next page


I have a report which is two group headers under the page header section.

The first group shows the council names while the second group shows suburbs based on the council selected in the first group.

In the details section I have further information related to the council and suburb.

What the report is meant to do:

When report is run and council has been selected, a page for each suburb and its specific information (detail) is to be shown on individual pages.

What the report is doing:

When report is run and council has been selected, a page for each suburb and its specific information (details) is shown however, one of the suburb details has more data which stays on the single page however the next page contains the same suburbs header plus directly underneath it, it shows the next suburbs header and then the specific information for that suburb.

How do I stop the suburb heading from the previous record from showing on top of the page before the next suburbs heading and only for the suburb with more details.

It looks like it is adding an empty record however not as an empty page. Reason for this comment is the very last page also contains the very last suburbs heading with no data.

My query which is used to generate the report does not have any empty records and I am not sure where else to look.

I hope this makes sense.

PS: I am using Access 2010 in case that makes a difference


Post your answer or comment

comments powered by Disqus
i need some help here.
In my Report, i have a group header(Companies) and in the details there the contacts in the companies.Another Company is pushed way down the report according to the number of contacts in the Company sorted to come before it.
So if the later Company has equally a good number of contacts, some of its detail(contacts) will be pushed to the next page leaving the group header(company name) in the previous page.

The problem is that some times all its detail can be pushed to the next page leaving the Company name on the previous page as the last line.

How can i force the group header(Company Name) to the next page in case it has come too way down to the last line.

Thanks in advance.

I created a form with a form header. When I click Print Preview, the form header shows on the first record, but does not show on the next records. Instead, a blue color appears.

I have a form with a client name in the header. If printing the forms records exceeds one page, then I would like the header to print out on each page instead of just the first. Can I edit the form to allow that to happen?

Hello. This is my first post here. I am usually lucky with just googling my problem but I am having no success. My problem is this: I have a report that shows groups of procedure codes that belong to a larger family.

In general the report looks like this

Larger Family Information 1
Related Procedure Information A
Related Procedure Information B
Larger Family Information 2
Related Procedure Information A
Related Procedure Information B
Related Procedure Information C
And so on. What I want it is, if the related procedure information spills onto the next page, that the larger family information is repeated at the top of that page. So, I set the group header repeat section to yes. And now it repeats at the top of the page like I wanted. However, if the last line of the detail section is the last line of the page the group header repeats at the top of the next page, even though there is no more information. (Right now this is happening on page 3 or the report.)
I have attached a clean version of the database with just the problematic report and its underlying table.

I would greatly appreciate any incite. I have tapped my resources here.

Attached Files Copy of (1.52 MB, 3 views) Reply With Quote 06-28-2012, 02:43 PM #2 June7 Super Moderator Windows XP Access 2010 32bit Join Date May 2011 Location The Great Land Posts 15,119 See if this helps

I'm know this is possible, and in fact I was nearly positive I had posted this question before, but after a search I still can't find the answer. How can I set a report so that the Group By header appears on each page, not just the first one? I've checked in the report properties but there's nothing there that I can see.

any help?

I have 3 reports which contain dynamic headers. These are in the grouping headers not the form headers. Preview and print of these work fine.
When they are used as sub-forms in a report, the headers are not visible. To get round this I have opened the 3 reports hidden using the On-activate property of the main report. Still with me?
The headers on the 3 forms are then visible but only the last of the 3 hidden reports data comes out on the main report.
Any help would be appreciated.

So I have a table that spills to the next page if it doesnt fit into one page?

I want my table header to be appearing if report is more than one page. How can I do that? I tried so many things and cant figure it out.

Right now it is like this:
ROW 111111111111
ROW 222222222222
ROW 333333333333
ROW 444444444444
ROW 555555555555
ROW 666666666666
ROW 777777777777
ROW 888888888888
ROW 999999999999

I want it to be like this:
ROW 111111111111
ROW 222222222222
ROW 333333333333
ROW 444444444444
ROW 555555555555
ROW 666666666666
ROW 777777777777
ROW 888888888888
ROW 999999999999


Hi All,

I'm trying to build a list based either on a date range (user entered) or a date range and a selection of items in a multiple drop down list.

The code below does work ok but I can't seem to refresh the sub form, I think I know it's because the sub form is based on the query I'm replacing each time, but is there a way around this!?
Or...have I gone about this all wrong?!?! That is a possibility...

	Dim dbs As DAO.Database
Dim qdf As DAO.QueryDef
Dim dblocal As Database
Dim varItem As Variant
Dim strSQL, strStat As String
Set dbs = CurrentDb
strStat = " "
strSQL = "SELECT mortgage.[mtg status],mortgage.Lender, Count(mortgage.[Mtg Id]) AS CaseCount, Sum(mortgage.[Loan Total]) AS
[Total Loan] FROM mortgage WHERE"
If selStatus.ItemsSelected.Count > 0 Then
On Error Resume Next
    DoCmd.DeleteObject acQuery, "tmpMtgStatusList"
    strStat = strStat & "([Mtg Status] ="
            For Each varItem In Me.selStatus.ItemsSelected
                strStat = strStat & Chr(34) & Me.[selStatus].ItemData(varItem) & Chr(34) & " AND mortgage.[App to Lender]
Between [forms]![frmMI-Lender-Master]![StartDate] And [forms]![frmMI-Lender-Master]![EndDate] " & " Or [Mtg Status] = "
                strStat = Left(strStat, Len(strStat) - 19)
    strSQL = strSQL & " " & strStat & ")GROUP BY mortgage.[Mtg Status],mortgage.Lender ORDER BY mortgage.Lender;"
    Me.test = strSQL
    Set qdf = dbs.CreateQueryDef("tmpMtgStatusList", strSQL)
strStat = " "
strSQL = "SELECT mortgage.Lender, Count(mortgage.[Mtg Id]) AS CaseCount, Sum(mortgage.[Loan Total]) AS [Total Loan] FROM
mortgage "
On Error Resume Next
    DoCmd.DeleteObject acQuery, "tmpMtgStatusList"
    strSQL = strSQL & " " & "GROUP BY mortgage.Lender ORDER BY mortgage.Lender;"
    Me.test = strSQL
    Set qdf = dbs.CreateQueryDef("tmpMtgStatusList", strSQL)
End If

Any help always welcomed.

I have a main form with several pages that are filled with subforms. On the main form is a header, with some key information that I want displayed once entered in a subform.

To be more specific, I have a subform where users can enter notes about a customer, and those notes are recorded as a memo field data type. Once those notes are written in the subform, I want them to appear in a "Customer Notes" box in the main form header.

I tried Autofill with a combo box, but I ran into two problems. One, I don't want the user to have to select on the combo box, I want the notes to just appear. Two, the notes are saved as a memo, so combo box would not even let me select it. Would I do an After Update event on the Notes subform? If so, what would the code be? I am very new to programming. Also, what would I have as the Control Source for the text box in the Form Header?

Any help would be greatly appreciated.

Hello all, I have a report, but I want the header ONLY on the first page, I have tried playing with the Header property, but i can't get it work.

The footer can go on every page, but it's the header I am having issues with.

Thanks in advance for all your help,

Simple question.

I have a report and would like to have my report header(not page header) shown on every page.

As at the moment the second page has nothing but the data, and not Report Header.

Thanks Again

I have a report that I want to Print/view on one page. The report is set to two columns with a total that uses report footer. Sum = ([items]) The total appears on the next page and I would like it to be at the end of the second column. What do I need to change to do this?

This is the requirement:

1.) First Page: Report Header ON and Page Header OFF.

2.) Balance of report: Page Header(s) ON.

I have searched the forum regarding this. I found where Mr. Pat Harman has listed the flow of how reports go. He has stated on more than one occasion that the page header is at the beginning of each page..... However, I have also seen in the forum, the term used in VBA: visible = false. Can something like this be used to turn OFF the page heater for the first page only?

Any help would be greatly appreciated!!!!

Hello all,

I have a report that prints different pages based on the testing required. This is done by having company info and general info in the page header of the report. The main worksheet area is in the page footer area and the various headings that are used for the different tests are each given their own group header. This works very well, it prints a different worksheet (page) for each different method for the test. Now they want the shorthand "code" for the test to appear by the sample ID which is in the page header. I can't figure out how to get the page header to have a textbox that will change it's control based on code for every new page it prints. It only settles on one and won't change. I kind of expected that but is there a way to change a text box so that only the test needed shows up on the page header for each page printed?
I hope this makes sense.


I have a report that shows employees by department. With each department, a new page is begun. Therefore, some departments will need 1 page while others will require 2. My problem is that I have a few departments that fit mostly on one page but one or two lines spill to the next page. is there anything I can do to avoid only one or two lines on the following page?

Hello, this is my first post here - great forums! I've been doing some searching both here and on the internet generally and I'm still none the wiser.

I'm helping a friend with an IT project - he's making a Stock Management System that manages the stock for several shops around the country. What we're stuck on is the code that would power a combo box to search records on a sub form.

For example, on a main form, the user would select which shop they want to update sales levels for, for example "Worcester", and then the sub form would only display the products that are being sold at the Worcester shop.

I hope that makes sense. So far, I believe that we would need to use the Recordset.FindFirst function, but I'm not sure if I'm completely correct.

Any advice would be greatly valued

I am working on A Q.C Database, I have a form that contains a sub form in datasheet view that has 18 fields I need to add as many as 20 records in the sub form per shift the next shift will create a new record in main form I believe that I need to use a query to show all records in sub form based on main form record ID

I have attached my database

Hi All,

This one's driving me crazy, can someone help before I pull all my hair out!!! I have a split database which holds information on clients receiving care from a Health service team. The database has a form "New Client Details" which consists of 7 tab pages, 5 of which have sub-forms on them. The main form is bound to a table called "Client details" which has information such as name, address etc.... All of the sub-forms are bound to a table called "Episode of Care" which contains information relating to the teams contact with the client (e.g. assessment, intervention, treatments etc...).

A clients contact with the team might end for different reasons (e.g. treatment completed, client does not attend, client inappropriate for the service etc...). These different bits of information are located on 3 of the current sub-forms called "Initial Screening", "Assessment" & "Intervention" respectively.

The database seems to be working fine except for when the date of discharge is entered. When information is entered via combo boxes that contact has come to an end (e.g. client not suitable for service) a pop-up form is opened which asks for comformation that the referral is to be closed. When confirmation is given the date is automatically entered into a field on the "episode of care" table called "DateReferralClosed". So depending on why the referral is being closed the "DateReferralClosed" field is being filled from any one of a number of different controls on 3 different sub-forms. The date of discharge is then automatically displayed on all seven tab pages. On the first tab it is displayed within the sub-form "Initial Screening", on the remaining six tab-pages it is displayed on the main form.

When the referral is closed through entering data into the 1st sub-form "Initial screening" everything seems to work fine. However when I enter referral closing data through the other two sub-forms problems occur. Initially everything seems okay, the correct data is displayed on the main form and on all the sub-forms, if I directly open the tables the correct data is also displayed in both the "Client Details" and "episode of care" tables. When I close the database things also seem okay. However when I try to reopen it and look at existing records the database seems corrupted. I get the message "Unrecognized database format", followed by the message "Database [name] needs to be repaired or isn't a database". Once the database is repaired it seems that the newly created record has correct data in the main form table "Client details" but the relevant record in the "episode of care" table (holding all the sub-forms data) shows "#ERROR" in all fields.

I hope all of this is not too confusing. I'm just going aroud in circles trying to sort this out. Does anyone have any ideas on what might be happening and how I might resolve it (hopefully before I'm completely bald).

Many Thanks


Hello Anyone

I want the header to print/show on every page. I tried to change it in the header property box but couldn't. Any suggestions?


Hi everyone,
I am stepping into sub-forms (Finally). I am creating a form to perform administrative functions (Verifying/closing records) on my DB. What I need some help on, is filtering the records for editing (in the sub-forms), I'd like to have one (maybe two) TextBox/Controls where I can enter a Record ID (I have two tables the same ID as FK's) and have the sub-forms filtered for only the records with the ID entered. Here’s what I have come up with so far, for an unbound control on the main form to get what I want on the two sub forms (seems to be doing the trick for this part):

Private Sub NcNumSearch_AfterUpdate()
Me.[F_CA_AdminSub].Form.Filter = "([NcNum] = '" & Me!NcNumSearch & "')"
Me.[F_CA_AdminSub].Form.FilterOn = True

Me.[F_RMA_AdminSub].Form.Filter = "([NcNum] = '" & Me!NcNumSearch & "')"
Me.[F_RMA_AdminSub].Form.FilterOn = True
End Sub

What I'd like to be able to do on top of this, is add the ability to double click on the ID of either sub-form (Datasheet view) to open a corresponding form, in that record for editing (subforms only contain minimal fields for closing records that I (or another user) Know the details are complete (records have several large text/memo fields). I've seen this in an "example" somewhere but can't seem to find now. Any help on doing this would be appreciated.

i have a form based on a table, in the table i have a field called ID which is an Autonumber .
for every record, the form lists a new Autonumber in the ID field. the same form also includes a sub form in which i'm trying to create a list box that lists the values of the ID field from main form and let the user choose only from one of them.
i can't base the list on the ID field from the table because i only want the values that are currently in use in the main form to show.

if anyone have an idea


Hi there,

I have a sub-form called frmLegalAidLedger on a form called profile, the sub-form has a field called Category.
I have a report which separates all the categories and then gives a total, however i need something which just gives you a total for each category which is already on the sub-form.

Just some extra info: The sub-form is in a Continuous View. There a five different categories. The calculation for the total is based on 2 fields.

Can anyone help? if you need more details please ask.

Thanks in advance.

Hello -

I am going crazy trying to sort out what should be a very straightforward reference to a field on a sub-form. There is an error in the WHERE clause of my query but I can't figure it out.

The hierarchy of my data is as follows:

Trips -> Activities -> Contacts

I have a main form called f_MainTripForm. On this Main form I have a sub-form called f_ActivityDetails where the user selects the Company they are visiting from a drop-down named Company_DD with a control source of Company_Listing_ID

The f_ActivityDetails sub-form has a tab control in which I have a sub-sub form named f_OtherFirmContacts on one of the pages

-> f_ActivityDetails joined on Trip_ID
->-> f_OtherFirmContacts joined on Activity_ID

In f_OtherFirmContacts I have a dropdown named SelectContact_DD that should select only the contacts that have a Company_ID = to the Listing_ID stored in the Company_DD drop-down in f_ActivityDetails.

I have this code for the SelectContact_DD drop down:



WHERE (((q_ContactsAtACompany.COMPANY_ID)=[Forms]![f_MainTripForm]![f_ActivityDetails].[Form]![Company_DD]))


When I open the form, I get a request to Enter Parameter Value.

When I create an unbound field in f_Contacts with the Control Source

I get a #Name error.

When I manually enter the COMPANY_ID in the Parameter Value request, all works fine.

Thanks for any suggestions - I am sure it is something simple to do with the syntax of the WHERE clause.


Happy New Year everyone..

If I have a text box on a main form and then I want that value to be displayed in a text box on a sub form.
The sub form is based on a query and the main form is based on a table. If the project has data in the query it displays fine but if a new record is entered into the main form when I click to enter in data in the second form the project number doesn't fill the text box in the sub form as there are no records for it in the query even though i am using the code =[Forms]![frmProject]![Project_No] in the control source for the text box on the sub form.

Is there anyway around this?

Not finding an answer? Try a Google search.