Displaying multiple fields in a Report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report that outputs cable routing data from the user. The data will
vary based upon what has been entered on the form and will be separated with
commas. I am using the following formula in the control source, but after
last Routing# is displayed it puts a comma after it. I want to have the data
displayed such that when the last entered data is displayed that a period or
nothing is shown after it.

How can I accomplish this?

Control Source formula:
=[Routing01]+","+" " & [Routing02]+","+" " & [Routing03]+","+" " &
[Routing04]+","+" " & [Routing05]+","+" " & [Routing06]+","+" " &
[Routing07]+","+" " & [Routing08]+","+" " & [Routing09]+","+" " &
[Routing10]+","+" " & [Routing11]+","+" " & [Routing12]+","+" " &
[Routing13]+","+" " & [Routing14]+","+" " & [Routing15]+","+" " &
[Routing16]+","+" " & [Routing17]+","+" " & [Routing18]+","+" " &
[Routing19]+","+" " & [Routing20]

Thanks for the help!
 
I have a report that outputs cable routing data
from the user. The data will vary based upon
what has been entered on the form and will be
separated with commas. I am using the following
formula in the control source, but after last
Routing# is displayed it puts a comma after it.
I want to have the data displayed such that
when the last entered data is displayed that a
period or nothing is shown after it.

How can I accomplish this?

Control Source formula:
=[Routing01]+","+" " & [Routing02]+","+" " & [Routing03]+","+" " &
[Routing04]+","+" " & [Routing05]+","+" " & [Routing06]+","+" " &
[Routing07]+","+" " & [Routing08]+","+" " & [Routing09]+","+" " &
[Routing10]+","+" " & [Routing11]+","+" " & [Routing12]+","+" " &
[Routing13]+","+" " & [Routing14]+","+" " & [Routing15]+","+" " &
[Routing16]+","+" " & [Routing17]+","+" " & [Routing18]+","+" " &
[Routing19]+","+" " & [Routing20]

Try structuring your expression as:

=[Routing01] & (", " + [Routing02]) & (", " + [Routing03]) & . . .

provided the Routing fields will be Null if there is no data for them. This
makes the comma dependent on the _following_ field having a value, instea of
your approach which always appends a comma if the preceding Routing field
has a value. There's no benefit in having the comma "," and a following
blank " " in separate quotations.

Larry Linson
Microsoft Access MVP
 

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

Similar Threads


Back
Top