hmm, okay. hopefully A97 has the Nz(), InStr(), Left(), Right(), and Len()
functions available. if so, the following code is pretty ugly, but see if it
will work for you:
Dim val As String, str As String, i As Integer
val = Nz(Me!Text0, "")
Do
i = InStr(1, val, ",")
If i > 0 Then
str = Nz(str, "") & "'" & Left(val, i - 1) & "'"
Else
str = Nz(str, "") & "'" & val & "'"
Exit Do
End If
val = Nz(Right(val, Len(val) - i), "")
str = str & ","
Loop Until val = ""
str = "SELECT TableName.FieldName FROM " _
& "TableName WHERE FieldName In(" & str & ")"
hth
> Tina: Nope, Split is not a valid funtion in '97 :( But thank you for
> the input!
>
> Jana
Jana - 30 Mar 2006 17:18 GMT
Tina:
Thanks very much, it worked like a charm!!!
Jana
tina - 30 Mar 2006 22:56 GMT
you're welcome :)
> Tina:
>
> Thanks very much, it worked like a charm!!!
>
> Jana
> Tina: Nope, Split is not a valid funtion in '97 :( But thank you for
> the input!
There must be hundreds of postings of Split functions for Access 97 and
earlier, in the newsgroups. Groups.Google is your frend -- keep
experiementing with search arguments.
Larry Linson
Microsoft Access MVP
Jana - 30 Mar 2006 18:51 GMT
Larry:
Thanks for the suggestion, after seeing the 'Split' function that Tina
mentioned, that's EXACTLY what I did! I had searched before posting,
but just hadn't known the proper search argument to really find what I
needed. Yet another term to file away for future search usage :-)
Jana
Jana - 30 Mar 2006 19:00 GMT
Larry:
btw, I found this great posting by Mike Preston in my quest:
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q188007&
Which has Microsoft equivalent functions for dealing with strings such
as Split, Join & Replace. Very handy!
Jana