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
|
|||
|
|||
Q2: KeepTogether property in Report Design View
Hi,
Using Access 97 at the moment, but this project will also be compatible for 2000+. This project is an Access Add-In I made and everything works fine except for a couple of tiny issues. I'm creating a report completely in code and I am unable to set the KeepTogether property for a group to "Whole Group." This is found when you go to the Sorting/Grouping dialog box. Nothing I have tried seems to make a difference. For illustration purposes try this code from the immediate window: Public Function funcTest2() Dim rpt As Report Dim varGroupLevel As Variant ' Start the process of creating report in Design View Set rpt = CreateReport ' Create the first Grouping Level varGroupLevel = CreateGroupLevel(rpt.Name, "FirstField", True, False) ' Set the Keep Together Property to Whole Group rpt.Section(acGroupLevel1Header).KeepTogether = True End Function On the last line the IntelliSense only presents True/False as the options. Well this is only setting the KeepTogether property to True. If you right click on that first header group you'll see it now says Yes on that specific line. However, what I'm trying to do is set KeepTogether property to "Whole Group" which appears to only be found in the Sorting/Grouping dialog box. Hitting F1 on that line and reading the Help files says I should set that property to 1 for "Whole Group." I've tried that and it still does not work. The Help file also says I can set this property in Report Design View. So how do you do that?!! I'm sure I could make some code in the Open event to accomplish this, but my first choice is to take care of everything when I create the report entirely in code. Any help is appreciated and thanks for your time. -- Jeff Conrad Access Junkie Bend, Oregon *282 Days Left* |
#2
|
|||
|
|||
KeepTogether property in Report Design View
Both GROUPS and SECTIONS have a KeepTogether property.
The SECTION property takes the values True/False: rpt.Section(acGroupLevel1Header).KeepTogether = True The GROUP property takes the values 1/2/3: rpt.GroupLevel(1).KeepTogether = 1 (david) "Jeff Conrad" wrote in message ... Hi, Using Access 97 at the moment, but this project will also be compatible for 2000+. This project is an Access Add-In I made and everything works fine except for a couple of tiny issues. I'm creating a report completely in code and I am unable to set the KeepTogether property for a group to "Whole Group." This is found when you go to the Sorting/Grouping dialog box. Nothing I have tried seems to make a difference. For illustration purposes try this code from the immediate window: Public Function funcTest2() Dim rpt As Report Dim varGroupLevel As Variant ' Start the process of creating report in Design View Set rpt = CreateReport ' Create the first Grouping Level varGroupLevel = CreateGroupLevel(rpt.Name, "FirstField", True, False) ' Set the Keep Together Property to Whole Group rpt.Section(acGroupLevel1Header).KeepTogether = True End Function On the last line the IntelliSense only presents True/False as the options. Well this is only setting the KeepTogether property to True. If you right click on that first header group you'll see it now says Yes on that specific line. However, what I'm trying to do is set KeepTogether property to "Whole Group" which appears to only be found in the Sorting/Grouping dialog box. Hitting F1 on that line and reading the Help files says I should set that property to 1 for "Whole Group." I've tried that and it still does not work. The Help file also says I can set this property in Report Design View. So how do you do that?!! I'm sure I could make some code in the Open event to accomplish this, but my first choice is to take care of everything when I create the report entirely in code. Any help is appreciated and thanks for your time. -- Jeff Conrad Access Junkie Bend, Oregon *282 Days Left* |
#3
|
|||
|
|||
KeepTogether property in Report Design View
Ahh haa!!!
Thank you, thank you David!! That was exactly what I was looking for. I just had to change it to: rpt.GroupLevel(0).KeepTogether = 1 Now I'm all finished and happy with it. Thanks again for the help! -- Jeff Conrad Access Junkie Bend, Oregon *282 Days Left* "david epsom dot com dot au" david@epsomdotcomdotau wrote in message ... Both GROUPS and SECTIONS have a KeepTogether property. The SECTION property takes the values True/False: rpt.Section(acGroupLevel1Header).KeepTogether = True The GROUP property takes the values 1/2/3: rpt.GroupLevel(1).KeepTogether = 1 (david) "Jeff Conrad" wrote in message ... Hi, Using Access 97 at the moment, but this project will also be compatible for 2000+. This project is an Access Add-In I made and everything works fine except for a couple of tiny issues. I'm creating a report completely in code and I am unable to set the KeepTogether property for a group to "Whole Group." This is found when you go to the Sorting/Grouping dialog box. Nothing I have tried seems to make a difference. For illustration purposes try this code from the immediate window: Public Function funcTest2() Dim rpt As Report Dim varGroupLevel As Variant ' Start the process of creating report in Design View Set rpt = CreateReport ' Create the first Grouping Level varGroupLevel = CreateGroupLevel(rpt.Name, "FirstField", True, False) ' Set the Keep Together Property to Whole Group rpt.Section(acGroupLevel1Header).KeepTogether = True End Function On the last line the IntelliSense only presents True/False as the options. Well this is only setting the KeepTogether property to True. If you right click on that first header group you'll see it now says Yes on that specific line. However, what I'm trying to do is set KeepTogether property to "Whole Group" which appears to only be found in the Sorting/Grouping dialog box. Hitting F1 on that line and reading the Help files says I should set that property to 1 for "Whole Group." I've tried that and it still does not work. The Help file also says I can set this property in Report Design View. So how do you do that?!! I'm sure I could make some code in the Open event to accomplish this, but my first choice is to take care of everything when I create the report entirely in code. Any help is appreciated and thanks for your time. -- Jeff Conrad Access Junkie Bend, Oregon *282 Days Left* |
#4
|
|||
|
|||
KeepTogether property in Report Design View
:~)
(david) "Jeff Conrad" wrote in message ... Ahh haa!!! Thank you, thank you David!! That was exactly what I was looking for. I just had to change it to: rpt.GroupLevel(0).KeepTogether = 1 Now I'm all finished and happy with it. Thanks again for the help! -- Jeff Conrad Access Junkie Bend, Oregon *282 Days Left* "david epsom dot com dot au" david@epsomdotcomdotau wrote in message ... Both GROUPS and SECTIONS have a KeepTogether property. The SECTION property takes the values True/False: rpt.Section(acGroupLevel1Header).KeepTogether = True The GROUP property takes the values 1/2/3: rpt.GroupLevel(1).KeepTogether = 1 (david) "Jeff Conrad" wrote in message ... Hi, Using Access 97 at the moment, but this project will also be compatible for 2000+. This project is an Access Add-In I made and everything works fine except for a couple of tiny issues. I'm creating a report completely in code and I am unable to set the KeepTogether property for a group to "Whole Group." This is found when you go to the Sorting/Grouping dialog box. Nothing I have tried seems to make a difference. For illustration purposes try this code from the immediate window: Public Function funcTest2() Dim rpt As Report Dim varGroupLevel As Variant ' Start the process of creating report in Design View Set rpt = CreateReport ' Create the first Grouping Level varGroupLevel = CreateGroupLevel(rpt.Name, "FirstField", True, False) ' Set the Keep Together Property to Whole Group rpt.Section(acGroupLevel1Header).KeepTogether = True End Function On the last line the IntelliSense only presents True/False as the options. Well this is only setting the KeepTogether property to True. If you right click on that first header group you'll see it now says Yes on that specific line. However, what I'm trying to do is set KeepTogether property to "Whole Group" which appears to only be found in the Sorting/Grouping dialog box. Hitting F1 on that line and reading the Help files says I should set that property to 1 for "Whole Group." I've tried that and it still does not work. The Help file also says I can set this property in Report Design View. So how do you do that?!! I'm sure I could make some code in the Open event to accomplish this, but my first choice is to take care of everything when I create the report entirely in code. Any help is appreciated and thanks for your time. -- Jeff Conrad Access Junkie Bend, Oregon *282 Days Left* |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Report Design Problem | imbd4a | General Discussion | 1 | August 8th, 2004 09:02 PM |
Properties dialog in design view | Jim Orson | Using Forms | 2 | August 5th, 2004 12:50 AM |
Printing form view w/ page break | Tim Tabor | New Users | 6 | July 7th, 2004 01:40 PM |
scrolling programmatically? | alekm | New Users | 1 | July 6th, 2004 02:56 AM |
How to show image in the form or report? | JJ | General Discussion | 1 | June 29th, 2004 06:01 AM |