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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|