[AccessD] Remove Beginning & Ending Quotes of a string

Robert Gracie Subscriptions at servicexp.com
Mon Sep 6 17:27:37 CDT 2004


Thanks Stuart, much cleaner then mine... :-)

Private Function ClearQuoutes(ByVal SData As String) As String
Dim strTemp As String
Dim lngLen  As Integer
lngLen = Len(SData)
    If Left(SData, 1) = """" Then
       strTemp = Left(SData, (lngLen - 1))
       strTemp = Right(strTemp, lngLen - 2)
       ClearQuoutes = strTemp
    Else
    ClearQuoutes = SData
    End If
End Function


Robert Gracie
www.servicexp.com
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Stuart
McLachlan
Sent: Monday, September 06, 2004 6:18 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Remove Beginning & Ending Quotes of a string


On 6 Sep 2004 at 17:51, Robert Gracie wrote:

> 
> Example "This is a "Fine" Day we are having to day"
> 
> I need to remove only the first and last quotes.
> 
>    This is a "Fine" Day we are having to day
> 

Mid$(myString,2,Len(myString)-2) will drop the first and last character, 
whatever they are.


-- 
Stuart


-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list