Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying first word only in a report text box 1

Status
Not open for further replies.

ImStuk

Technical User
Feb 20, 2003
62
US
I have a table that has Law Firm names in it like the following: Jones Jackson & Johnson etc...

How can I have a text box on a report only show the first name (Jones). I would assume there is a way of identifying the space between and stopping it there, but I just don't have the experience to figure it out. Help Please.

 
I actually figured something out:
Expr: Left([FirmName],InStr([FirmName]," ")-1)

However, when the FirmName on file is only one name already I am getting an error. Where have I failed?
 
Try IIF Function

________________________________________
Zameer Abdulla
Visit Me
A child may not be able to lift too much.
But it can certainly hold a marriage together
 
Expr: Left([FirmName],InStr([FirmName] & " "," ")-1)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top