Eliminating a field if it's blank

G

Guest

I have 2 address lines in my application. If the second line is blank I want
to eliminate it and move the rest of the form up. for example; Move
City/State up under Address line 1 vs address line 2.

Is there a way to do this?
 
S

Stefan Hoffmann

hi Mike,

Mike said:
I have 2 address lines in my application. If the second line is blank I want
to eliminate it and move the rest of the form up. for example; Move
City/State up under Address line 1 vs address line 2.
Use one control for your two address lines´, set its ControlSource to

"=[Address1] & Chr(13) & Chr(10) & " & _
"[Address1] & Chr(13) & Chr(10) & " & _
"[City] & [State]"

and the CanGrow property to True. Resize it to a height of one text line.


mfG
--> stefan <--
 
M

Marshall Barton

Mike Kearns said:
I have 2 address lines in my application. If the second line is blank I want
to eliminate it and move the rest of the form up. for example; Move
City/State up under Address line 1 vs address line 2.


If there are no other controls in the same "horizontal
band", the just set the second address line's text box and
its section's CanShrink property to Yes.

If that doesn't take care of it, use a single CanGrow text
box with an expression like:

=(adr1 + Chr(13) + Chr(10)) & (adr2 + Chr(13) + Chr(10)) &
addr3
 

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