Code for making a text box invisible?

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
 
F

fredg

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.
 

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