On Format

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a text box that I would like to set visible to False if the field is
null. Normally this would not be a problem, but I have set the border style
to solid and border width to 2 pt., which means I have big emtpy boxes on all
my records. This defeat the reason I have set these properties, which is to
make it stand out when it is populated.

I tried using the On Format to set the visible property, but this seems to
be checking the first record on the page and formatting everything
accordingly.

Any suggestions?

TIA,

Paul Hammond
 
I have a text box that I would like to set visible to False if the field is
null. Normally this would not be a problem, but I have set the border style
to solid and border width to 2 pt., which means I have big emtpy boxes on all
my records. This defeat the reason I have set these properties, which is to
make it stand out when it is populated.

I tried using the On Format to set the visible property, but this seems to
be checking the first record on the page and formatting everything
accordingly.

Any suggestions?

TIA,

Paul Hammond

Whether or not your control has a border is not relevant to making the
control visible or not.
You must have used the wrong event or incorrect code.

I assume the control is located in the Detail section. If so, code the
Detail Format event:
[ControlName].Visible = Not IsNull([ControlName])
 
"You must have used the wrong event or incorrect code."

I used Incorrect code:
If IsNull(Me.txtRunout) Then Me.txtRunout.Visible = False

Your's worked perfect. Thanks for the help

Paul





fredg said:
I have a text box that I would like to set visible to False if the field is
null. Normally this would not be a problem, but I have set the border style
to solid and border width to 2 pt., which means I have big emtpy boxes on all
my records. This defeat the reason I have set these properties, which is to
make it stand out when it is populated.

I tried using the On Format to set the visible property, but this seems to
be checking the first record on the page and formatting everything
accordingly.

Any suggestions?

TIA,

Paul Hammond

Whether or not your control has a border is not relevant to making the
control visible or not.
You must have used the wrong event or incorrect code.

I assume the control is located in the Detail section. If so, code the
Detail Format event:
[ControlName].Visible = Not IsNull([ControlName])
 
Back
Top