A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Q2: KeepTogether property in Report Design View



 
 
Thread Tools Display Modes
  #1  
Old August 10th, 2004, 08:29 PM
Jeff Conrad
external usenet poster
 
Posts: n/a
Default 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  
Old August 11th, 2004, 05:34 AM
david epsom dot com dot au
external usenet poster
 
Posts: n/a
Default 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  
Old August 11th, 2004, 07:26 AM
Jeff Conrad
external usenet poster
 
Posts: n/a
Default 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  
Old August 11th, 2004, 07:35 AM
david epsom dot com dot au
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 12:20 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.