Access 2003 expression for Trim

Hello,
   I am a newbie to access and am having some difficulty with the following:
I have a control source in an access report that places city org and name in the correct order I need them to show up.  It looks loke this: =Trim([City] & " -- " & [Organization] & "--" & [Full Name])
This works fine except I need this, if the name listed does not have an organization I need only "" not "--" if they do have an organization they will need the "--"
LVL 3
aplonaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rey Obrero (Capricorn1)Commented:
try this

=Trim([City] & " -- " & IIF([Organization] is null,"",[Organization] & " -- ") & [Full Name])
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
aplonaAuthor Commented:
That did the trick.  I have about 30 reports though, how do I add that to all of them at the same time?
0
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
>I have about 30 reports though, how do I add that to all of them at the same time?
Unless all 30 report's RecordSource's are the same, you don't add them 'at the same time', you find each RecordSource / ControlSource and do it one at a time.
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

aplonaAuthor Commented:
I have this under the control source in the report.  All reports I have will have the same control source.  Is it possible to change all of the report control source to this all at once rather than doing into each one.
0
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
>I have this under the control source in the report.  
Just to clarify terms, reports have a record source, and all data-bound controls on a report have a control source.
0
aplonaAuthor Commented:
I see.  The record source for each report I have is the query.  It looks like I will have to do this individually right?
0
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
>It looks like I will have to do this individually right?
You'll have to flush out all the unique queries that serve as the record sources for your 30-ish reports, and change each one.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.