Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 01-17-2001, 04:45 PM   #1
Lily
Newly Registered User
 
Join Date: Sep 2000
Posts: 42
Thanks: 3
Thanked 0 Times in 0 Posts
Lily
Omit Comma

Hello,

I used an expression in a query to join the first name and last name fields separated by a comma and then the title...as follows:

Name: [First Name] & " " & [Last Name] & ", " & [Title]

However, how do I get it to omit the comma if there is no title for a particular person. Thank you very much for your help, it is much appreciated.

Lily is offline   Reply With Quote
Old 01-17-2001, 07:31 PM   #2
R. Hicks
AWF VIP
 
R. Hicks's Avatar
 
Join Date: Dec 1999
Location: Birmingham, Alabama, USA
Posts: 619
Thanks: 0
Thanked 3 Times in 3 Posts
R. Hicks is on a distinguished road
Try this:

Name: [First Name] & " " & [Last Name] & IIf(IsNull([Title]), Null, ", " & [Title])

HTH
RDH
R. Hicks is offline   Reply With Quote
Old 01-17-2001, 07:57 PM   #3
Lily
Newly Registered User
 
Join Date: Sep 2000
Posts: 42
Thanks: 3
Thanked 0 Times in 0 Posts
Lily
RDH,

Thank you so much again!! It works perfectly, and I thank you for your help.

Lily is offline   Reply With Quote
Old 01-17-2001, 08:19 PM   #4
R. Hicks
AWF VIP
 
R. Hicks's Avatar
 
Join Date: Dec 1999
Location: Birmingham, Alabama, USA
Posts: 619
Thanks: 0
Thanked 3 Times in 3 Posts
R. Hicks is on a distinguished road
No problem, you are very welcome.

RDH

R. Hicks is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump




All times are GMT -8. The time now is 08:11 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World