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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding field from table to a report based on check box

Status
Not open for further replies.

dnelson24

IS-IT--Management
Apr 1, 2002
59
US
anyone,

I have a form that I added check boxes to. I would like to be able to, based on the check box being checked, include on a report a field from a table?

thanks again

david
 
More Information:

On the form I have 5 text boxes and next to each one I have check box.

On the report I have each of the 5 text boxes values being displayed.... i.e. =[Forms]![Price Print Form]![txtSize1]through =[Forms]![Price Print Form]![txtSize5]

I would like when the check box is checked next to txtSize4, for example, to be displayed on the report....if no check box then it is not displayed on the report???



Thanks
David
 
I see you have two postings on this one with a little more detail. If you just have 5 fields that should be displayed or not you could make them visible or invisible depending upon the checkboxes. You would create the controls in the report and set their visible property to false. Then in the OnOpen event procedure of the report put some code in like this example:

Code:
Me![Field1].visible = IIF(FORMS![formname]![checkbox1],True,False)
Me![Field2].visible = IIF(FORMS![formname]![checkbox2],True,False)
Me![Field3].visible = IIF(FORMS![formname]![checkbox3],True,False)
Me![Field4].visible = IIF(FORMS![formname]![checkbox4],True,False)
Me![Field5].visible = IIF(FORMS![formname]![checkbox5],True,False)

This could be a quick fix for this more limited problem. I may have over-complicated the other posting a bit. Sorry.


Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top