Notices


Reply
 
LinkBack Thread Tools Display Modes

Old 08-24-2006, 03:23 PM   #1 (permalink)
Junior Member

kazooassistant's Avatar

Join Date: Jun 2006
Posts: 12
Rep Power: 0 kazooassistant is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)

Access Help Needed

My original post about a week ago asked how to set up a phone directory in Word. With all your help, I was able to produce a Word document that looked great. However, my supervisor wants the phone directory set up and printed using Access. I have not used Access very much, but was able to get the directory set up with a help from a colleague in another office.

The only problem we are having is the spacing between the last and first name.
My output looks like this: Jones (large space between) John
My supervisor wants it to look like this: Jones, John

How do I get the comma in between the names and do away with the large space???

Any help will be greatly, greatly, greatly appreciated.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 08-24-2006, 03:30 PM   #2 (permalink)
Systems Analyst

Join Date: May 2006
Posts: 236
Rep Power: 3 Don Sabo is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)

If you have two different fields, one for Last Name and one for First Name then you can use the following:

=Trim([Last Name] & " ," & [First Name])

You want to put a space before the comma within the quote marks.
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 08-24-2006, 04:05 PM   #3 (permalink)
Crystal Reports Guru

DrewAllen's Avatar

Join Date: May 2006
Location: Philadelphia, PA
Posts: 1,160
Rep Power: 4 DrewAllen is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)
- Information Edge (TIE)
- API/VBA

Quote:
Originally Posted by Don Sabo View Post
If you have two different fields, one for Last Name and one for First Name then you can use the following:

=Trim([Last Name] & " ," & [First Name])

You want to put a space before the comma within the quote marks.

The closing paren should be after [Last Name]. If the last name is stored as "Smith_____ ", (I had to replace the spaces with underlines.) you're still going to get a lot of spaces between the last name and the comma. You want to Trim() the last name before adding the comma and first name, not Trim() the entire construction.

The space should be AFTER the comma, not before or you're going to get "Smith ,John" when what you want is "Smith, John".

Drew
__________________
J. Drew Allen
Children's Hospital of Philadelphia

Crystal Reports and SQL Server Consultant

It is better to live your destiny imperfectly than to live an imitation of somebody else's life with perfection.

Last edited by DrewAllen; 08-24-2006 at 04:08 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 08-24-2006, 04:17 PM   #4 (permalink)
my feet hurt.

Melissa Siobhan's Avatar

Join Date: May 2006
Location: Connecticut
Posts: 1,455
Rep Power: 4 Melissa Siobhan is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)

Quote:
Originally Posted by DrewAllen View Post
The closing paren should be after [Last Name]. If the last name is stored as "Smith_____ ", (I had to replace the spaces with underlines.) you're still going to get a lot of spaces between the last name and the comma. You want to Trim() the last name before adding the comma and first name, not Trim() the entire construction.Drew
I think that the space issue she is having is more due to the fact that she had a last name field that she made long enough to accommodate long names and then had a separate field for first name.

If she has spaces after her name I'd see your point but assuming she has clean data I usually trim the entire construction as in Don's example (with the exception of the comma error) and it works just fine that way.
__________________
Melissa S. Graves

Director of Development Services
The Village for Families and Children
www.villageforchildren.org




Last edited by Melissa Siobhan; 08-24-2006 at 04:19 PM. Reason: i'm stupid and can't spell or remember to use the spell check
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 08-24-2006, 04:26 PM   #5 (permalink)
Crystal Reports Guru

DrewAllen's Avatar

Join Date: May 2006
Location: Philadelphia, PA
Posts: 1,160
Rep Power: 4 DrewAllen is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)
- Information Edge (TIE)
- API/VBA

Quote:
Originally Posted by Melissa Siobhan View Post
I think that the space issue she is having is more due to the fact that she had a last name field that she made long enough to accommodate long names and then had a separate field for first name.

If she has spaces after her name I'd see your point but assuming she has clean data I usually trim the entire construction as in Don's example (with the exception of the comma error) and it works just fine that way.
It actually depends on how the field is stored. I believe that in RE, it's a varchar field (variable length), so if it's linked in Access, you don't need to do a Trim() at all. However, if it's been imported into Access as a char field (fixed length), then it does require the trim of the Last Name.

Trim() removes spaces from the beginning and end of a field. It will not remove excess spaces from the middle of a field.

Drew
__________________
J. Drew Allen
Children's Hospital of Philadelphia

Crystal Reports and SQL Server Consultant

It is better to live your destiny imperfectly than to live an imitation of somebody else's life with perfection.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 08-24-2006, 04:31 PM   #6 (permalink)
my feet hurt.

Melissa Siobhan's Avatar

Join Date: May 2006
Location: Connecticut
Posts: 1,455
Rep Power: 4 Melissa Siobhan is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)

Drew,

You are probably right it probably is not needed but I saw it that way in an example one day and it worked and never caused problems so I kept using it. I learned much of access this way so I frequently use functions I really do not understand. (confession time!)

Thanks for your help.
__________________
Melissa S. Graves

Director of Development Services
The Village for Families and Children
www.villageforchildren.org



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 08-25-2006, 08:03 AM   #7 (permalink)
Junior Member

kazooassistant's Avatar

Join Date: Jun 2006
Posts: 12
Rep Power: 0 kazooassistant is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)

This forum is the best!!!!
Your help has solved my problem.
I've been a RE user for about 7 years and just joined this forum....this is such a great resource. Thanks!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 08-25-2006, 09:17 AM   #8 (permalink)
BUS Driver

Peter Gulka's Avatar

Join Date: May 2006
Location: Winnipeg, MB, Canada
Posts: 1,638
Rep Power: 4 Peter Gulka is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)
- Blackbaud Analytics/Researcher's Edge (BBA/TRE)
- API/VBA

Quote:
Originally Posted by kazooassistant View Post
This forum is the best!!!!
This is, of course, the correct answer

__________________
Peter Gulka
Chief Bus Driver
Blackbaud User Society
www.blackbus.org

Follow me on Twitter

View Peter Gulka's profile on LinkedIn
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
access, help, needed


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Debt Consolidation - Cheap Gas - Loan - Credit Counseling
All times are GMT -6. The time now is 12:25 AM.

Miscellaneous


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by BBpixel Team 2008 :: jvbPlugin R1012.364.1

SEO by vBSEO 3.2.0 Copyright 2008 Blackbaud User SocietyAd Management by RedTyger
Inactive Reminders By Icora Web Design

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64