Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 3rd, 2007, 09:58 PM
Authorized User
 
Join Date: May 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to jd_erd Send a message via AIM to jd_erd Send a message via MSN to jd_erd Send a message via Yahoo to jd_erd
Default trim a string to the first character

Would someone please tell me how to trim a string to the first character for example


Dave Would be trimmed to just D


:)

jd erd
__________________
jd erd
 
Old May 3rd, 2007, 11:20 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Hi JD,

There are a few things you could try... Perhaps the easiest would just be:

Left("Dave", 1)

there is also...

Mid("Dave", 1,1) for D
and
Mid("Dave", 1,2) for Da

Hope that helps

Mike

Mike
EchoVue.com
 
Old May 6th, 2007, 11:01 PM
Authorized User
 
Join Date: May 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to jd_erd Send a message via AIM to jd_erd Send a message via MSN to jd_erd Send a message via Yahoo to jd_erd
Default

Thank you so much your left suggestion worked perfectly:D

jd erd





Similar Threads
Thread Thread Starter Forum Replies Last Post
Trim a string in VBA lryckman Access VBA 2 January 19th, 2007 08:39 AM
javascript string Trim() frunction kokuthanda VBScript 0 October 12th, 2006 02:45 AM
String.trim() mrfox BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 1 January 8th, 2006 12:23 AM
Delete last a character in string dtho Excel VBA 27 December 7th, 2005 01:01 PM
Replacing a character from string itHighway Classic ASP Basics 5 March 14th, 2005 11:15 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.