how to use Sql IN Statement with list of Items selected from treeviewlist? : how to join string values from "For Next Loop" into one single string





 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim accid As String
        Dim iLast As Integer
        iLast = trv.Nodes.Count
        Dim p As Integer = 0
        For p = 0 To iLast - 1
            If TrV.Nodes(p).Checked = True Then
                accid = Strings.Left(TrV.Nodes(p).Text, 9)
                MsgBox(accid)
            End If
        Next
    End Sub

this give me seperate output of string "accid"
i want this output = "accid1,accid2,accid3"

thanks for supporting