Trim function on a report line

stanger1

Registered User.
Local time
Today, 13:02
Joined
Jul 30, 2002
Messages
53
I am using a trim function on a report line that will place the address number, address prefix, address street, address type, address suffix, and address extension on one line. The problem I am having is if I do not have an address number or address prefix, the line does not left justify. The line does not go clear to the left hand side. Listed below is a sample of my code.

=Trim([ADD_NO]) & " " & Trim([add_pre]) & " " & Trim([add_st]) & " " & Trim([add_type]) & " " & Trim([add_suf]) & " " & [add_ext]

Any help would be greatly appreciated.
 
stranger1,

If I understand you correctly your report is like:

Address-OtherField-AnotherField

In the example above you would be using three controls to
store your fields. If there is no address, I would assume
that you want your line to look like:

OtherField-AnotherField

You could create some unbound textboxes, make them invisible
in "normal mode", and then when you get to a record with
no address:

Make Address field invisible,
Move One of your fields to the Invisible column 1, make column 1
visible, and make the "bound" original column invisible.
Repeat this for each column.

Personnally this seems like a lot of work and I'm not sure that
the end result would be easy to read with your other columns
"snaking" down the page.

Wayne
 
Wayne,

Thanks for your reply.
 
Too many trims! Change to

=Trim([ADD_NO] & " " & [add_pre] & " " & [add_st] & " " & [add_type] & " " & [add_suf] & " " & [add_ext])
 

Users who are viewing this thread

Back
Top Bottom