IIf Null, then hide

  • Thread starter Thread starter Andrew
  • Start date Start date
A

Andrew

I have a form based on a query that will display one
result after parameters are entered. Depending on the
parameters entered, some or all of the textboxes will be
filled with data. Is there a way to program the form or
textboxes to only appear if there is data in it? So if it
is null, then hide it. Any direction or advice is greatly
appreciated. thanks,

Andrew.
 
In the current event of the form, for each control that potentially needs to
be hidden:

me.text1.visible=not isnull(me.text1)

Note that this is not going to give the desired results if the form is a
continuous form. On a continuous form the visibility of all rows will
adjusted according to the values in the current row.
 
I get an error when I type the code line. "Expected ="
The highlighted area is at "me.text1"
-----Original Message-----
In the current event of the form, for each control that potentially needs to
be hidden:

me.text1.visible=not isnull(me.text1)

Note that this is not going to give the desired results if the form is a
continuous form. On a continuous form the visibility of all rows will
adjusted according to the values in the current row.

--
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.

I have a form based on a query that will display one
result after parameters are entered. Depending on the
parameters entered, some or all of the textboxes will be
filled with data. Is there a way to program the form or
textboxes to only appear if there is data in it? So if it
is null, then hide it. Any direction or advice is greatly
appreciated. thanks,

Andrew.


.
 
disregard last post. it was a typing error i made.
thankyou for your help. it is working like i wanted now.
-----Original Message-----
In the current event of the form, for each control that potentially needs to
be hidden:

me.text1.visible=not isnull(me.text1)

Note that this is not going to give the desired results if the form is a
continuous form. On a continuous form the visibility of all rows will
adjusted according to the values in the current row.

--
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.

I have a form based on a query that will display one
result after parameters are entered. Depending on the
parameters entered, some or all of the textboxes will be
filled with data. Is there a way to program the form or
textboxes to only appear if there is data in it? So if it
is null, then hide it. Any direction or advice is greatly
appreciated. thanks,

Andrew.


.
 
Back
Top