Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Controllling Print fields with check box

Status
Not open for further replies.

kpryan

Technical User
Aug 24, 2005
282
US
Hi

I would like to be able to print specific fields on a report by using a check box.
On a form I want to select certain text boxes with a check box and for only those selected boxes to print on a report.
Could I have some help with this please.

KP
 
G'day mate,

Depending on how many fields there are a quick and easy option could be something like this on the reports Onformat event

Code:
me!fieldname.visible=forms!yourform!YourCheckBox
me!OtherFieldname.visible=forms!yourform!YourOtherCheckBox
me!YetAnotherFieldname.visible=forms!yourform!YetAnotherCheckBox

 
You may want to consider a multiselect listbox. You would need a lot less code since could loop the itemsselected property, and if you modify the report it would be much easier to add or subtract field names from the mutiselect listbox.
 
Also, be careful to exclude any fields which are in the sorting and grouping (or other critical fields).

Other concerns may include the format (appearance) of the report. Gaping holes (large areas of white space) in the middle of a report are, at their best, ugly!



MichaelRed


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top