Code for making a text box invisible?

  • Thread starter Thread starter Dan Goble
  • Start date Start date
D

Dan Goble

I have a report
There is a control box which is the concatenated first and lastname of a
husband
Next to it is a label with the word "and" to go with the concatenated first
and last name of the wife.
But sometimes there is no wife
Then I get "John Smith and"
I assume I want to set visible to no in the "label box" to make it invisible
when there is nothing in the wifes control box.
I tried a macro with condition "" and "Null" and Is Null but can get it to
come back true.
I just want the and to go away when there is nothing in the wifes control
box

Ideas?
Thanks
Dan
 
I have a report
There is a control box which is the concatenated first and lastname of a
husband
Next to it is a label with the word "and" to go with the concatenated first
and last name of the wife.
But sometimes there is no wife
Then I get "John Smith and"
I assume I want to set visible to no in the "label box" to make it invisible
when there is nothing in the wifes control box.
I tried a macro with condition "" and "Null" and Is Null but can get it to
come back true.
I just want the and to go away when there is nothing in the wifes control
box

Ideas?
Thanks
Dan

Just use one text control not 2 plus a label.
Set an unbound control's control source to:
=[HisFirst] & " " & [HisLast] & (" and " + [HerFirst] & [" " &
[HerLast])

If there is no HerFirst name everything within the parenthesis will
not appear.
 
Back
Top