I would like to concatenate a text box in a report, with a twist. The text
box will always display the field 'palintiff' and the field 'defendant'. On
ocassion it may have to display 'plaintiff', 1st co-plaintiff, 2nd
co-plaintiff, defendant, 1st co-defendant, and 2nd co-defendant' or any
combination thereof. There will always be a plaintiff and defendant but not
always 1st and 2nd parties of each. I hope I made this clear. Any help in
how to concatenate the text box would be greatly appreciated.

Signature
DMainland
Rick Brandt - 16 Dec 2006 17:48 GMT
>I would like to concatenate a text box in a report, with a twist. The text
> box will always display the field 'palintiff' and the field 'defendant'. On
[quoted text clipped - 3 lines]
> always 1st and 2nd parties of each. I hope I made this clear. Any help in
> how to concatenate the text box would be greatly appreciated.
= [plaintiff] & (", " + [1st co-plaintiff]) & (", " + [2nd co-plaintiff]) & (",
" + [defendant]) & (", " + [1st co-defendant]) & (", " + [2nd co-defendant])
The + will produce a Null for the entire expression within the parenthesis if
the field within is null so you should only get a ", " when the field actually
contains data.

Signature
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
fredg - 16 Dec 2006 17:49 GMT
> I would like to concatenate a text box in a report, with a twist. The text
> box will always display the field 'palintiff' and the field 'defendant'. On
[quoted text clipped - 3 lines]
> always 1st and 2nd parties of each. I hope I made this clear. Any help in
> how to concatenate the text box would be greatly appreciated.
Try it this way, using an unbound text control:
= [Plaintiff] & (" "+[CoPlaintiff1]) & (" "+[CoPlaintiff2]) & " " &
[Defendent] & (" "+[CoDefentdent1]) & (" "+[CoDefendent2])

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Al Campagna - 17 Dec 2006 04:19 GMT
Fred,
I see that both you and Rick used the + in your concatenation.
That is a really an elegant solution to those pesky null/not null multi-field
concatenations!
I'll definitely remember that one...

Signature
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
>> I would like to concatenate a text box in a report, with a twist. The text
>> box will always display the field 'palintiff' and the field 'defendant'. On
[quoted text clipped - 8 lines]
> = [Plaintiff] & (" "+[CoPlaintiff1]) & (" "+[CoPlaintiff2]) & " " &
> [Defendent] & (" "+[CoDefentdent1]) & (" "+[CoDefendent2])
Al Campagna - 16 Dec 2006 17:50 GMT
DMainland,
If my suggestion doesn't work for you, please give some examples of your data, your
fields, and what you'd like to do. (what you have vs. what you want)
I'll assume...
> plaintiff, 1st co-plaintiff, 2nd co-plaintiff,
are separate fields (ex. P1, P2, P3) that may or may not have values in them. Same for
Defendant (ex. D1, D2, D3)
I also assume there is always a Plaintiff.
Plaintiffs field:
= [P1] & " " & [P2] & " " & [P3]
If There is no P2 or P3, two spaces will be added to the end of P1, but that shouldn't be
a problem in a report.
If it is aproblem...
= [P1] & IIF(IsNull([P2]),""," " & [P2]) & IIF(IsNull([P3]),""," " & [P3])

Signature
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
>I would like to concatenate a text box in a report, with a twist. The text
> box will always display the field 'palintiff' and the field 'defendant'. On
[quoted text clipped - 3 lines]
> always 1st and 2nd parties of each. I hope I made this clear. Any help in
> how to concatenate the text box would be greatly appreciated.