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

Complex Report Visible/Not Visible Need 1

Status
Not open for further replies.

jonmitch

IS-IT--Management
Oct 15, 2002
21
US
I have a report that is pulled from a Query and in that query, among other things are 9 YES/NO fields that come over as check boxes. On the report I arranged them as follows:
These 4 are arranged below each other on the left:
Label38 then RFSBankruptcy (that is the name of the check box and the Control Source)
Label40 then RFSIndustryIssues (name and control source)
Label42 then RFSLiquidityIssues (same)
Label44 then RFSOperationalIssues (same)

These 5 alligned below each other on the right:
Label39 then RFSGeneralEconomy (same)
Label41 then RFSLenderIssues (same)
Label43 then RFSManagementProblems (same)
Label45 then RFSPoorAcquisitions (same)
Label46 then RFSOther (same)

Here is what I need:
1) I don't want any of the check boxes visible
2) I only want those labels Visible where there is a check, meaning a Yes value from the table.
3) Then I also want the spacing to automatically adjust. For example if the person check RFSBankruptcy and RFS Other, on the form you would have a label high to the left and low to the right with nothing in betweem.

Does anyone know the proper way to do all the things above?
Any help would be greatly appreciated!!!
 
Well to get the first part, set all the checkbox and Label Visible properties to No. Then put this in the Format Event for the section these are in.

If RFSBankruptcy = -1 Then
Label38.Visible = True
Else
Label38.Visible = False
End If

If RFSIndustryIssues = -1 Then
Label40.Visible = True
Else
Label40.Visible = False
End If

You will have to test each one seperately so you will need an If statement for each one.

As for the alignment, set all the Can Grow and Can Shrink properties to Yes and see what that does.

Paul
 
Thanks for the Reply Paul. The code above worked perfectly, except for one problem, the Can Shrink/Can Grow did not work. So, the check boxes are not visible, and the correct label shows when check as yes, but the spacing is all over the place. Any suggestions with that?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top