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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

having semicolon list in table field

Status
Not open for further replies.

frobo

Programmer
May 13, 2005
14
CH
how i can iterate with vba code through a semicolon seperated list saved in a table field?

tia
 
Take a look at the Split function (ac2k or above).

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Hi!

If you don't have the split fuction available try this:

Dim lngPosition As Long
Dim lngFirstPosition As Long
Dim strInformation As String

lngFirstPosition = 0
lngPosition = InStr(YourDelimitedString, ";")
While lngPosition <> 0
If lngFirstPosition = 0 Then
strInformation = Left(YourDelimitedString, lngPosition - 1)
Else
strInformation = Mid(YourDelimitedString, lngFirstPosition + 1, lngPosition - lngFirstPostion - 1)
End If
(Do your stuff to strInformation here)
strFirstPosition = strPosition
strPosition = InStr(strPosition + 1, YourDelimitedString, ";")
Loop

hth


Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top