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!

Hide label when text box is empty 1

Status
Not open for further replies.

EELungs

IS-IT--Management
Jan 5, 2002
4
US
In MS Access I have this report:

Student(Label): StudentName (Text Box)
----------------------------
School Name(Label): School(Text Box)
GPA (Label): GradeAverage (Text Box)

School Name(Label): School(Text Box)
GPA (Label): GradeAverage (Text Box)

So if the text box is empty on GradeAverage (second school) the GPA label will not print just for the second school
 
in the Detail_Print event you would write so VBA code to check the GradeAverage text box. If the box is enpty, then GPA(Label) is made invisible.


if isnull(me.GradeAverage) or len(me.gradeaverage) = 0 then
me.GPA(Label).visible = false
else
me.gpa(Label).visible = true
endif

Let me know if this works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top