• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 584
  • Last Modified:

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 "--"
0
aplona
Asked:
aplona
  • 3
  • 3
1 Solution
 
Rey Obrero (Capricorn1)Commented:
try this

=Trim([City] & " -- " & IIF([Organization] is null,"",[Organization] & " -- ") & [Full Name])
0
 
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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
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

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now