Visable Labels and Text Boxes

  • Thread starter Morgan Gartland via AccessMonster.com
  • 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
 
D

Duane Hookom

We don't know your symptoms are? Where is the code and where are the
controls?
 
M

Morgan Gartland via AccessMonster.com

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
 
D

Duane Hookom

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top