Visable Labels and Text Boxes

  • Thread starter Thread starter Morgan Gartland via AccessMonster.com
  • Start date Start date
M

Morgan Gartland via AccessMonster.com

Hello

I have a report and on this report i have three text boxes (txt1, txt2 &
txtctrl) and two labels (lbl1 & lbl2). When txt1 is >= txtctrl i would like
lbl1 & lbl2 to be visible and txt1 & txt2 to be invisible. the code i have
used is below. Could someone please point out where i am going wrong.

If txt1 >= txtctrl Then
txt1.Visible = False
txt2.Visible = False
lbl1.Visible = True
lbl2.Visible = True
Else
txt1.Visible = True
txt2.Visible = True
lbl1.Visible = False
lbl2.Visible = False
End If

many thanks
 
my report is based on a query, the three text boxes on the report are from
this query and the labels i have created.

txt1 & txt2 are showing the same information and are calculated fields,
txtctrl is just displaying a value (all text boxes are displaying whole
numbers), the labels are just showing a message.

Originally nothing was happening, now i am getting the error message "you
have entered a expression that has no value".the code is now placed on the
Reports Open event.

Thanks
Morgan
 
You didn't suggest which section of the report the controls and code are
located.
Apparently your text boxes and fields have the same names?
Is it possible for any of the fields to be Null?
 
Back
Top