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

reporting fields visible based on report type

Status
Not open for further replies.

chainedtodesk

Programmer
Feb 26, 2003
112
US
i have a report that has multiple responses that need to be visible based on the selected menu. the report runs but no matter what is selected the fields do not return visible. i created the report with all as visible = no in the properties field, and at report_open i call the following code.

Private Sub Report_Open(Cancel As Integer)
If Me.typeofreview.Value = 1 Then
GoTo print01
Else
If Me.typeofreview.Value = 2 Then
GoTo print02
Else
print01:
ques01_Label.Visible = True
ques01.Visible = True
print02:
ques02_Label.Visible = True
ques02.Visible = True
 
Any code that sets properties of a control should run in the On Format event of the report section.
Code:
   ' I think if the label is attached to the text box, 
   '    the label will also be in/visible
   Me.ques01.Visible = (Me.TypeOfReview = 1)
   Me.ques02.Visible = (Me.TypeOfReview = 2)


Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top