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 » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Best way to make report sections optional ?



 
 
Thread Tools Display Modes
  #1  
Old January 11th, 2008, 09:44 PM posted to microsoft.public.access.reports
mscertified
external usenet poster
 
Posts: 835
Default Best way to make report sections optional ?

I have a report that has several sections of data that are optional.
The user indicates this by checkboxes on the form that runs the report.
What is the best way to do this, make them subreports even though the data
is all in the same table row?
  #2  
Old January 11th, 2008, 10:53 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Best way to make report sections optional ?

mscertified wrote:

I have a report that has several sections of data that are optional.
The user indicates this by checkboxes on the form that runs the report.
What is the best way to do this, make them subreports even though the data
is all in the same table row?



Insufficient information ;-)

What do you mean by "sections of data"?

If it's actual report sections, then add code to the
section's Format event procedu
Cancel = Forms!theform.thissectioncheckbox

If it's just some text boxes in the detail section, then
make them invisible:
Dim bolSection As Boolean
bolSection = Forms!theform.sectionAcheckbox
Me.thisbox.Visible = bolSection
Me.thatbox.Visible = bolSection
, , ,
bolSection = Forms!theform.sectionBcheckbox
Me.otherbox.Visible = bolSection
, , ,

--
Marsh
MVP [MS Access]
  #3  
Old January 12th, 2008, 12:29 AM posted to microsoft.public.access.reports
Armen Stein
external usenet poster
 
Posts: 507
Default Best way to make report sections optional ?

On Fri, 11 Jan 2008 16:53:15 -0600, Marshall Barton
wrote:

mscertified wrote:

I have a report that has several sections of data that are optional.
The user indicates this by checkboxes on the form that runs the report.
What is the best way to do this, make them subreports even though the data
is all in the same table row?



Insufficient information ;-)

What do you mean by "sections of data"?

If it's actual report sections, then add code to the
section's Format event procedu
Cancel = Forms!theform.thissectioncheckbox

If it's just some text boxes in the detail section, then
make them invisible:
Dim bolSection As Boolean
bolSection = Forms!theform.sectionAcheckbox
Me.thisbox.Visible = bolSection
Me.thatbox.Visible = bolSection
, , ,
bolSection = Forms!theform.sectionBcheckbox
Me.otherbox.Visible = bolSection
, , ,


Well, if the checkbox indicates that the section is "On", then you'll
need to flip it with a Not:

Cancel = Not Forms!theform.thissectioncheckbox

And if you use the visibility technique, and if you want your whole
report to shrink when those controls are hidden, set Can Shrink on
your sections and fields, and make sure no controls are side-by-side
or overlapping, as these will cancel the shrinkage. So to speak.

Armen Stein
Microsoft Access MVP
www.JStreetTech.com

 




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


All times are GMT +1. The time now is 07:44 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.