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

trouble creating string 1

Status
Not open for further replies.

butchkmd

Programmer
Nov 13, 2001
83
0
0
US
I'm reading a recordset and creating a string to be used in a select case.

Do While Not rsT.EOF
strLinked = """ & Trim(rsT(1)) & "", " & strLinked
rsT.MoveNext
Loop

I can't get it to give me a string of

"rst(1)", "rst(1)", and so on.

silly I know.

Thanks
 
try this :
Code:
Do While Not rsT.EOF
    strLinked = chr$(34) & Trim(rsT(1)) & chr$(34) & ", " & strLinked
    rsT.MoveNext
Loop
Water is not bad as long as it stays out human body ;-)
 
Yes, you can't directly have a " included as part of a
string, as " is reserved to mark the ends of strings. That's
why you had to use Chr(34).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top