Pick String Letters

GavZ

Mostly Beginners Luck!
Local time
Today, 14:08
Joined
May 4, 2007
Messages
56
Hi,

Ist it possible to pick out characters from a string.

For example if i have a string of 50 characters can i pick out the 2nd 4th 6th 8th and 10th character?

Thanks in advance!
 
The Mid function should do the job for you. See Access help for more info
 
Gav,

Code:
Public Function GetEvenChars(strInput As String) As String
Dim strTemp As String
Dim i As Integer

strTemp = ""
i = 2
While i <= Len(strInput)
   strTemp = strTemp & Mid(strInput, i, 1)
   i = i + 2
   Wend
GetEvenChars = strTemp

End Function

Wayne
 

Users who are viewing this thread

Back
Top Bottom