If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Turn off Group header and turn on Page Header
I have created a report that needs to print a group header for page 1 of the
customer and then print page headers while the customer stays the same. When the customer changes, I don't need the Page Header to print, just the Group Header. This is really important and I'm trying to figure out if it something I have to do in VBA or if it something that can easily be done within the Report program within Access. The hierarchy of my report is: Sort By: Customer - Product Group - Product Group By: Customer - Product Group This is how my report prints right now: {No Report Header Customer Name {Customer Header Fields Address City, State zip Phone Product Q1 Q2 Q3 Q4 {Customer Header Labels ProductX xx xx xx xx {Detail Records [Page 2, Same Customer] Product Q1 Q2 Q3 Q4 {Page Header ProductX xx xx xx xx {Detail Records [Page 3, New Customer] Product Q1 Q2 Q3 Q4 {Page Header Customer Name {Customer Header Fields Address City, State zip Phone Product Q1 Q2 Q3 Q4 {Customer Header Labels ProductX xx xx xx xx {Detail Records And therein is my problem. Because the page header prints on the new page AND my Customer Header prints because it is a new customer, my column headings print twice. I want my page three to look like this for a new customer: [Page 3, New Customer] Customer Name {Customer Header Fields Address City, State zip Phone Product Q1 Q2 Q3 Q4 {Customer Header Labels ProductX xx xx xx xx {Detail Records Thanks for your quick response. Tom |
#2
|
|||
|
|||
Turn off Group header and turn on Page Header
Cat's Meow wrote:
I have created a report that needs to print a group header for page 1 of the customer and then print page headers while the customer stays the same. When the customer changes, I don't need the Page Header to print, just the Group Header. This is really important and I'm trying to figure out if it something I have to do in VBA or if it something that can easily be done within the Report program within Access. The hierarchy of my report is: Sort By: Customer - Product Group - Product Group By: Customer - Product Group This is how my report prints right now: {No Report Header Customer Name {Customer Header Fields Address City, State zip Phone Product Q1 Q2 Q3 Q4 {Customer Header Labels ProductX xx xx xx xx {Detail Records [Page 2, Same Customer] Product Q1 Q2 Q3 Q4 {Page Header ProductX xx xx xx xx {Detail Records [Page 3, New Customer] Product Q1 Q2 Q3 Q4 {Page Header Customer Name {Customer Header Fields Address City, State zip Phone Product Q1 Q2 Q3 Q4 {Customer Header Labels ProductX xx xx xx xx {Detail Records And therein is my problem. Because the page header prints on the new page AND my Customer Header prints because it is a new customer, my column headings print twice. I think you can just do away with the page header and set the group header section's RepeatSection property to Yes. -- Marsh MVP [MS Access] |
#3
|
|||
|
|||
Turn off Group header and turn on Page Header
Marsha,
Thanks for your quick response! If I turn on the RepeatSection property, that will print all of my customer header information on every page. To conserve report space, I only want my customer information to print on page 1 of the new customer. On page 2, 3, etc within the same customer I want the column labels to print for Product, Q1, Q2, Q3, Q4 detail. But when the customer changes, I don't need these labels at the top of the page because they are already included within the Customer Group Header. Is there a way I can attach the output of my report to show you the issue I'm having? I appreciate your help and will look forward to your response. Tom "Marshall Barton" wrote: Cat's Meow wrote: I have created a report that needs to print a group header for page 1 of the customer and then print page headers while the customer stays the same. When the customer changes, I don't need the Page Header to print, just the Group Header. This is really important and I'm trying to figure out if it something I have to do in VBA or if it something that can easily be done within the Report program within Access. The hierarchy of my report is: Sort By: Customer - Product Group - Product Group By: Customer - Product Group This is how my report prints right now: {No Report Header Customer Name {Customer Header Fields Address City, State zip Phone Product Q1 Q2 Q3 Q4 {Customer Header Labels ProductX xx xx xx xx {Detail Records [Page 2, Same Customer] Product Q1 Q2 Q3 Q4 {Page Header ProductX xx xx xx xx {Detail Records [Page 3, New Customer] Product Q1 Q2 Q3 Q4 {Page Header Customer Name {Customer Header Fields Address City, State zip Phone Product Q1 Q2 Q3 Q4 {Customer Header Labels ProductX xx xx xx xx {Detail Records And therein is my problem. Because the page header prints on the new page AND my Customer Header prints because it is a new customer, my column headings print twice. I think you can just do away with the page header and set the group header section's RepeatSection property to Yes. -- Marsh MVP [MS Access] |
#4
|
|||
|
|||
Turn off Group header and turn on Page Header
I don't know about Marsha, but I don't have time to dig into
someone else's database. I think you can get what you want by adding a line of code to the group **footer** section's Format event procedu Me.Section(3).Visible = False Then, you can turn the page header back on in the group **header** Me.Section(3).Visible = True -- Marsh MVP [MS Access] Cat's Meow wrote: Marsha, Thanks for your quick response! If I turn on the RepeatSection property, that will print all of my customer header information on every page. To conserve report space, I only want my customer information to print on page 1 of the new customer. On page 2, 3, etc within the same customer I want the column labels to print for Product, Q1, Q2, Q3, Q4 detail. But when the customer changes, I don't need these labels at the top of the page because they are already included within the Customer Group Header. Is there a way I can attach the output of my report to show you the issue I'm having? Cat's Meow wrote: I have created a report that needs to print a group header for page 1 of the customer and then print page headers while the customer stays the same. When the customer changes, I don't need the Page Header to print, just the Group Header. This is really important and I'm trying to figure out if it something I have to do in VBA or if it something that can easily be done within the Report program within Access. The hierarchy of my report is: Sort By: Customer - Product Group - Product Group By: Customer - Product Group This is how my report prints right now: {No Report Header Customer Name {Customer Header Fields Address City, State zip Phone Product Q1 Q2 Q3 Q4 {Customer Header Labels ProductX xx xx xx xx {Detail Records [Page 2, Same Customer] Product Q1 Q2 Q3 Q4 {Page Header ProductX xx xx xx xx {Detail Records [Page 3, New Customer] Product Q1 Q2 Q3 Q4 {Page Header Customer Name {Customer Header Fields Address City, State zip Phone Product Q1 Q2 Q3 Q4 {Customer Header Labels ProductX xx xx xx xx {Detail Records And therein is my problem. Because the page header prints on the new page AND my Customer Header prints because it is a new customer, my column headings print twice. "Marshall Barton" wrote: I think you can just do away with the page header and set the group header section's RepeatSection property to Yes. |
#5
|
|||
|
|||
Turn off Group header and turn on Page Header
Marshall that is great! However, this is where I am weakest in Access --
defining event procedures. Can you help me with the code to print a page header and a group header? If I can build the logic that says: If GroupHeader is going to print Then don't print page header Else Print Page Header End-If I just don't know the syntax to write those statements. I'm trying to learn VBA, but I have a long way to go. Thanks in advance for the pointer. Tom "Marshall Barton" wrote: I don't know about Marsha, but I don't have time to dig into someone else's database. I think you can get what you want by adding a line of code to the group **footer** section's Format event procedu Me.Section(3).Visible = False Then, you can turn the page header back on in the group **header** Me.Section(3).Visible = True -- Marsh MVP [MS Access] Cat's Meow wrote: Marsha, Thanks for your quick response! If I turn on the RepeatSection property, that will print all of my customer header information on every page. To conserve report space, I only want my customer information to print on page 1 of the new customer. On page 2, 3, etc within the same customer I want the column labels to print for Product, Q1, Q2, Q3, Q4 detail. But when the customer changes, I don't need these labels at the top of the page because they are already included within the Customer Group Header. Is there a way I can attach the output of my report to show you the issue I'm having? Cat's Meow wrote: I have created a report that needs to print a group header for page 1 of the customer and then print page headers while the customer stays the same. When the customer changes, I don't need the Page Header to print, just the Group Header. This is really important and I'm trying to figure out if it something I have to do in VBA or if it something that can easily be done within the Report program within Access. The hierarchy of my report is: Sort By: Customer - Product Group - Product Group By: Customer - Product Group This is how my report prints right now: {No Report Header Customer Name {Customer Header Fields Address City, State zip Phone Product Q1 Q2 Q3 Q4 {Customer Header Labels ProductX xx xx xx xx {Detail Records [Page 2, Same Customer] Product Q1 Q2 Q3 Q4 {Page Header ProductX xx xx xx xx {Detail Records [Page 3, New Customer] Product Q1 Q2 Q3 Q4 {Page Header Customer Name {Customer Header Fields Address City, State zip Phone Product Q1 Q2 Q3 Q4 {Customer Header Labels ProductX xx xx xx xx {Detail Records And therein is my problem. Because the page header prints on the new page AND my Customer Header prints because it is a new customer, my column headings print twice. "Marshall Barton" wrote: I think you can just do away with the page header and set the group header section's RepeatSection property to Yes. |
#6
|
|||
|
|||
Turn off Group header and turn on Page Header
The lines of code I posted do that.
Because the next group header is going to be printed following the current group footer, you do not need an If. Just make the page header invisible. (If you don't already have a group footer, create it and set its Height to 0). Conversely, since the next thing after a group header and some details will be a page header, you can just make the page header visible again. On the other hand, if all of the details fit on one page, the group footer will make it invisible for the start of next group. If your question is how to create the event procedures, just click on the bar above the section in the report's design view. Then use the View - Properties menu item to display the section's properties list. Select the events tab in the properties window and scan down the list to the OnFormat property select [Event Procedure] for the property, then click on the builder button [...] in the property's right margin. This will create a skeletal procedure if the procedure didn't already exist. It then places the cursor in the procedure ready for you to enter code. -- Marsh MVP [MS Access] Cat's Meow wrote: Marshall that is great! However, this is where I am weakest in Access -- defining event procedures. Can you help me with the code to print a page header and a group header? If I can build the logic that says: If GroupHeader is going to print Then don't print page header Else Print Page Header End-If I just don't know the syntax to write those statements. I'm trying to learn VBA, but I have a long way to go. Thanks in advance for the pointer. "Marshall Barton" wrote: I don't know about Marsha, but I don't have time to dig into someone else's database. I think you can get what you want by adding a line of code to the group **footer** section's Format event procedu Me.Section(3).Visible = False Then, you can turn the page header back on in the group **header** Me.Section(3).Visible = True Cat's Meow wrote: Marsha, Thanks for your quick response! If I turn on the RepeatSection property, that will print all of my customer header information on every page. To conserve report space, I only want my customer information to print on page 1 of the new customer. On page 2, 3, etc within the same customer I want the column labels to print for Product, Q1, Q2, Q3, Q4 detail. But when the customer changes, I don't need these labels at the top of the page because they are already included within the Customer Group Header. Is there a way I can attach the output of my report to show you the issue I'm having? Cat's Meow wrote: I have created a report that needs to print a group header for page 1 of the customer and then print page headers while the customer stays the same. When the customer changes, I don't need the Page Header to print, just the Group Header. This is really important and I'm trying to figure out if it something I have to do in VBA or if it something that can easily be done within the Report program within Access. The hierarchy of my report is: Sort By: Customer - Product Group - Product Group By: Customer - Product Group This is how my report prints right now: {No Report Header Customer Name {Customer Header Fields Address City, State zip Phone Product Q1 Q2 Q3 Q4 {Customer Header Labels ProductX xx xx xx xx {Detail Records [Page 2, Same Customer] Product Q1 Q2 Q3 Q4 {Page Header ProductX xx xx xx xx {Detail Records [Page 3, New Customer] Product Q1 Q2 Q3 Q4 {Page Header Customer Name {Customer Header Fields Address City, State zip Phone Product Q1 Q2 Q3 Q4 {Customer Header Labels ProductX xx xx xx xx {Detail Records And therein is my problem. Because the page header prints on the new page AND my Customer Header prints because it is a new customer, my column headings print twice. "Marshall Barton" wrote: I think you can just do away with the page header and set the group header section's RepeatSection property to Yes. |
#7
|
|||
|
|||
Turn off Group header and turn on Page Header
Marshall,
Thank you! One last question. Tell me what the syntax of this statement means: Me.Section(3).Visible=True I understand the Visible = True, but why is it Me.Section(3)? What doe the Me.Section do? What does the (3) represent (i.e. why is it 3, not 2, or 4) Thanks Marshall for helping me learn the syntax. Tom "Marshall Barton" wrote: The lines of code I posted do that. Because the next group header is going to be printed following the current group footer, you do not need an If. Just make the page header invisible. (If you don't already have a group footer, create it and set its Height to 0). Conversely, since the next thing after a group header and some details will be a page header, you can just make the page header visible again. On the other hand, if all of the details fit on one page, the group footer will make it invisible for the start of next group. If your question is how to create the event procedures, just click on the bar above the section in the report's design view. Then use the View - Properties menu item to display the section's properties list. Select the events tab in the properties window and scan down the list to the OnFormat property select [Event Procedure] for the property, then click on the builder button [...] in the property's right margin. This will create a skeletal procedure if the procedure didn't already exist. It then places the cursor in the procedure ready for you to enter code. -- Marsh MVP [MS Access] Cat's Meow wrote: Marshall that is great! However, this is where I am weakest in Access -- defining event procedures. Can you help me with the code to print a page header and a group header? If I can build the logic that says: If GroupHeader is going to print Then don't print page header Else Print Page Header End-If I just don't know the syntax to write those statements. I'm trying to learn VBA, but I have a long way to go. Thanks in advance for the pointer. "Marshall Barton" wrote: I don't know about Marsha, but I don't have time to dig into someone else's database. I think you can get what you want by adding a line of code to the group **footer** section's Format event procedu Me.Section(3).Visible = False Then, you can turn the page header back on in the group **header** Me.Section(3).Visible = True Cat's Meow wrote: Marsha, Thanks for your quick response! If I turn on the RepeatSection property, that will print all of my customer header information on every page. To conserve report space, I only want my customer information to print on page 1 of the new customer. On page 2, 3, etc within the same customer I want the column labels to print for Product, Q1, Q2, Q3, Q4 detail. But when the customer changes, I don't need these labels at the top of the page because they are already included within the Customer Group Header. Is there a way I can attach the output of my report to show you the issue I'm having? Cat's Meow wrote: I have created a report that needs to print a group header for page 1 of the customer and then print page headers while the customer stays the same. When the customer changes, I don't need the Page Header to print, just the Group Header. This is really important and I'm trying to figure out if it something I have to do in VBA or if it something that can easily be done within the Report program within Access. The hierarchy of my report is: Sort By: Customer - Product Group - Product Group By: Customer - Product Group This is how my report prints right now: {No Report Header Customer Name {Customer Header Fields Address City, State zip Phone Product Q1 Q2 Q3 Q4 {Customer Header Labels ProductX xx xx xx xx {Detail Records [Page 2, Same Customer] Product Q1 Q2 Q3 Q4 {Page Header ProductX xx xx xx xx {Detail Records [Page 3, New Customer] Product Q1 Q2 Q3 Q4 {Page Header Customer Name {Customer Header Fields Address City, State zip Phone Product Q1 Q2 Q3 Q4 {Customer Header Labels ProductX xx xx xx xx {Detail Records And therein is my problem. Because the page header prints on the new page AND my Customer Header prints because it is a new customer, my column headings print twice. "Marshall Barton" wrote: I think you can just do away with the page header and set the group header section's RepeatSection property to Yes. |
#8
|
|||
|
|||
Turn off Group header and turn on Page Header
Me is the object that contains the code, in this case the
report. Section is a property of the report that returns the Section object specified by the following index number. See Help for more details on this stuff, but in short, section 0 is the detail section, 1 - Report Header, 2 - Report Footer, 3 - Page Header, 4 - Page Footer, 5 - first Group Header, etc. You can use the name of the section instead, e.g. Me.PageHeaderSection.Visible = True but since you might have changed it to some other name, I used Section(3) to eliminate any confusion. -- Marsh MVP [MS Access] Cat's Meow wrote: Thank you! One last question. Tell me what the syntax of this statement means: Me.Section(3).Visible=True I understand the Visible = True, but why is it Me.Section(3)? What doe the Me.Section do? What does the (3) represent (i.e. why is it 3, not 2, or 4) "Marshall Barton" wrote: The lines of code I posted do that. Because the next group header is going to be printed following the current group footer, you do not need an If. Just make the page header invisible. (If you don't already have a group footer, create it and set its Height to 0). Conversely, since the next thing after a group header and some details will be a page header, you can just make the page header visible again. On the other hand, if all of the details fit on one page, the group footer will make it invisible for the start of next group. If your question is how to create the event procedures, just click on the bar above the section in the report's design view. Then use the View - Properties menu item to display the section's properties list. Select the events tab in the properties window and scan down the list to the OnFormat property select [Event Procedure] for the property, then click on the builder button [...] in the property's right margin. This will create a skeletal procedure if the procedure didn't already exist. It then places the cursor in the procedure ready for you to enter code. -- Marsh MVP [MS Access] Cat's Meow wrote: Marshall that is great! However, this is where I am weakest in Access -- defining event procedures. Can you help me with the code to print a page header and a group header? If I can build the logic that says: If GroupHeader is going to print Then don't print page header Else Print Page Header End-If I just don't know the syntax to write those statements. I'm trying to learn VBA, but I have a long way to go. Thanks in advance for the pointer. "Marshall Barton" wrote: I don't know about Marsha, but I don't have time to dig into someone else's database. I think you can get what you want by adding a line of code to the group **footer** section's Format event procedu Me.Section(3).Visible = False Then, you can turn the page header back on in the group **header** Me.Section(3).Visible = True Cat's Meow wrote: Marsha, Thanks for your quick response! If I turn on the RepeatSection property, that will print all of my customer header information on every page. To conserve report space, I only want my customer information to print on page 1 of the new customer. On page 2, 3, etc within the same customer I want the column labels to print for Product, Q1, Q2, Q3, Q4 detail. But when the customer changes, I don't need these labels at the top of the page because they are already included within the Customer Group Header. Is there a way I can attach the output of my report to show you the issue I'm having? Cat's Meow wrote: I have created a report that needs to print a group header for page 1 of the customer and then print page headers while the customer stays the same. When the customer changes, I don't need the Page Header to print, just the Group Header. This is really important and I'm trying to figure out if it something I have to do in VBA or if it something that can easily be done within the Report program within Access. The hierarchy of my report is: Sort By: Customer - Product Group - Product Group By: Customer - Product Group This is how my report prints right now: {No Report Header Customer Name {Customer Header Fields Address City, State zip Phone Product Q1 Q2 Q3 Q4 {Customer Header Labels ProductX xx xx xx xx {Detail Records [Page 2, Same Customer] Product Q1 Q2 Q3 Q4 {Page Header ProductX xx xx xx xx {Detail Records [Page 3, New Customer] Product Q1 Q2 Q3 Q4 {Page Header Customer Name {Customer Header Fields Address City, State zip Phone Product Q1 Q2 Q3 Q4 {Customer Header Labels ProductX xx xx xx xx {Detail Records And therein is my problem. Because the page header prints on the new page AND my Customer Header prints because it is a new customer, my column headings print twice. "Marshall Barton" wrote: I think you can just do away with the page header and set the group header section's RepeatSection property to Yes. |
#9
|
|||
|
|||
Turn off Group header and turn on Page Header
Marshall,
Thank you very much. You have solved my problem. Kudos to your manager! Tom "Marshall Barton" wrote: Me is the object that contains the code, in this case the report. Section is a property of the report that returns the Section object specified by the following index number. See Help for more details on this stuff, but in short, section 0 is the detail section, 1 - Report Header, 2 - Report Footer, 3 - Page Header, 4 - Page Footer, 5 - first Group Header, etc. You can use the name of the section instead, e.g. Me.PageHeaderSection.Visible = True but since you might have changed it to some other name, I used Section(3) to eliminate any confusion. -- Marsh MVP [MS Access] Cat's Meow wrote: Thank you! One last question. Tell me what the syntax of this statement means: Me.Section(3).Visible=True I understand the Visible = True, but why is it Me.Section(3)? What doe the Me.Section do? What does the (3) represent (i.e. why is it 3, not 2, or 4) "Marshall Barton" wrote: The lines of code I posted do that. Because the next group header is going to be printed following the current group footer, you do not need an If. Just make the page header invisible. (If you don't already have a group footer, create it and set its Height to 0). Conversely, since the next thing after a group header and some details will be a page header, you can just make the page header visible again. On the other hand, if all of the details fit on one page, the group footer will make it invisible for the start of next group. If your question is how to create the event procedures, just click on the bar above the section in the report's design view. Then use the View - Properties menu item to display the section's properties list. Select the events tab in the properties window and scan down the list to the OnFormat property select [Event Procedure] for the property, then click on the builder button [...] in the property's right margin. This will create a skeletal procedure if the procedure didn't already exist. It then places the cursor in the procedure ready for you to enter code. -- Marsh MVP [MS Access] Cat's Meow wrote: Marshall that is great! However, this is where I am weakest in Access -- defining event procedures. Can you help me with the code to print a page header and a group header? If I can build the logic that says: If GroupHeader is going to print Then don't print page header Else Print Page Header End-If I just don't know the syntax to write those statements. I'm trying to learn VBA, but I have a long way to go. Thanks in advance for the pointer. "Marshall Barton" wrote: I don't know about Marsha, but I don't have time to dig into someone else's database. I think you can get what you want by adding a line of code to the group **footer** section's Format event procedu Me.Section(3).Visible = False Then, you can turn the page header back on in the group **header** Me.Section(3).Visible = True Cat's Meow wrote: Marsha, Thanks for your quick response! If I turn on the RepeatSection property, that will print all of my customer header information on every page. To conserve report space, I only want my customer information to print on page 1 of the new customer. On page 2, 3, etc within the same customer I want the column labels to print for Product, Q1, Q2, Q3, Q4 detail. But when the customer changes, I don't need these labels at the top of the page because they are already included within the Customer Group Header. Is there a way I can attach the output of my report to show you the issue I'm having? Cat's Meow wrote: I have created a report that needs to print a group header for page 1 of the customer and then print page headers while the customer stays the same. When the customer changes, I don't need the Page Header to print, just the Group Header. This is really important and I'm trying to figure out if it something I have to do in VBA or if it something that can easily be done within the Report program within Access. The hierarchy of my report is: Sort By: Customer - Product Group - Product Group By: Customer - Product Group This is how my report prints right now: {No Report Header Customer Name {Customer Header Fields Address City, State zip Phone Product Q1 Q2 Q3 Q4 {Customer Header Labels ProductX xx xx xx xx {Detail Records [Page 2, Same Customer] Product Q1 Q2 Q3 Q4 {Page Header ProductX xx xx xx xx {Detail Records [Page 3, New Customer] Product Q1 Q2 Q3 Q4 {Page Header Customer Name {Customer Header Fields Address City, State zip Phone Product Q1 Q2 Q3 Q4 {Customer Header Labels ProductX xx xx xx xx {Detail Records And therein is my problem. Because the page header prints on the new page AND my Customer Header prints because it is a new customer, my column headings print twice. "Marshall Barton" wrote: I think you can just do away with the page header and set the group header section's RepeatSection property to Yes. |
#10
|
|||
|
|||
Turn off Group header and turn on Page Header
I'm glad to have been able to help solve your problem.
Manager? What manager? I don't need no stinking manager. (my wife's opinion to the contrary ;-)) -- Marsh MVP [MS Access] Cat's Meow wrote: Marshall, Thank you very much. You have solved my problem. Kudos to your manager! Tom "Marshall Barton" wrote: Me is the object that contains the code, in this case the report. Section is a property of the report that returns the Section object specified by the following index number. See Help for more details on this stuff, but in short, section 0 is the detail section, 1 - Report Header, 2 - Report Footer, 3 - Page Header, 4 - Page Footer, 5 - first Group Header, etc. You can use the name of the section instead, e.g. Me.PageHeaderSection.Visible = True but since you might have changed it to some other name, I used Section(3) to eliminate any confusion. -- Marsh MVP [MS Access] Cat's Meow wrote: Thank you! One last question. Tell me what the syntax of this statement means: Me.Section(3).Visible=True I understand the Visible = True, but why is it Me.Section(3)? What doe the Me.Section do? What does the (3) represent (i.e. why is it 3, not 2, or 4) "Marshall Barton" wrote: The lines of code I posted do that. Because the next group header is going to be printed following the current group footer, you do not need an If. Just make the page header invisible. (If you don't already have a group footer, create it and set its Height to 0). Conversely, since the next thing after a group header and some details will be a page header, you can just make the page header visible again. On the other hand, if all of the details fit on one page, the group footer will make it invisible for the start of next group. If your question is how to create the event procedures, just click on the bar above the section in the report's design view. Then use the View - Properties menu item to display the section's properties list. Select the events tab in the properties window and scan down the list to the OnFormat property select [Event Procedure] for the property, then click on the builder button [...] in the property's right margin. This will create a skeletal procedure if the procedure didn't already exist. It then places the cursor in the procedure ready for you to enter code. -- Marsh MVP [MS Access] Cat's Meow wrote: Marshall that is great! However, this is where I am weakest in Access -- defining event procedures. Can you help me with the code to print a page header and a group header? If I can build the logic that says: If GroupHeader is going to print Then don't print page header Else Print Page Header End-If I just don't know the syntax to write those statements. I'm trying to learn VBA, but I have a long way to go. Thanks in advance for the pointer. "Marshall Barton" wrote: I don't know about Marsha, but I don't have time to dig into someone else's database. I think you can get what you want by adding a line of code to the group **footer** section's Format event procedu Me.Section(3).Visible = False Then, you can turn the page header back on in the group **header** Me.Section(3).Visible = True Cat's Meow wrote: Marsha, Thanks for your quick response! If I turn on the RepeatSection property, that will print all of my customer header information on every page. To conserve report space, I only want my customer information to print on page 1 of the new customer. On page 2, 3, etc within the same customer I want the column labels to print for Product, Q1, Q2, Q3, Q4 detail. But when the customer changes, I don't need these labels at the top of the page because they are already included within the Customer Group Header. Is there a way I can attach the output of my report to show you the issue I'm having? Cat's Meow wrote: I have created a report that needs to print a group header for page 1 of the customer and then print page headers while the customer stays the same. When the customer changes, I don't need the Page Header to print, just the Group Header. This is really important and I'm trying to figure out if it something I have to do in VBA or if it something that can easily be done within the Report program within Access. The hierarchy of my report is: Sort By: Customer - Product Group - Product Group By: Customer - Product Group This is how my report prints right now: {No Report Header Customer Name {Customer Header Fields Address City, State zip Phone Product Q1 Q2 Q3 Q4 {Customer Header Labels ProductX xx xx xx xx {Detail Records [Page 2, Same Customer] Product Q1 Q2 Q3 Q4 {Page Header ProductX xx xx xx xx {Detail Records [Page 3, New Customer] Product Q1 Q2 Q3 Q4 {Page Header Customer Name {Customer Header Fields Address City, State zip Phone Product Q1 Q2 Q3 Q4 {Customer Header Labels ProductX xx xx xx xx {Detail Records And therein is my problem. Because the page header prints on the new page AND my Customer Header prints because it is a new customer, my column headings print twice. "Marshall Barton" wrote: I think you can just do away with the page header and set the group header section's RepeatSection property to Yes. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Disparate Header Field size | Laurie | Page Layout | 9 | September 22nd, 2005 05:08 PM |
Excel - turn a page number in a header from horizontal to vertical | pbrookstx | Charts and Charting | 1 | June 4th, 2005 01:01 AM |
Insert objects at page breaks | DRS - Jonathan | General Discussion | 4 | November 29th, 2004 07:16 PM |
Unchecking 'different first page' in header removes graphic from first page | Denise | Page Layout | 4 | November 26th, 2004 11:36 AM |
Header and Footer turn off for certain page | Anthony | Setting Up & Running Reports | 3 | November 8th, 2004 02:58 AM |