I need to concatenate a value for each time it goes through the loop. This loop is used to pass the values to the database and that part works (the Call AddEquipUsers) but then I want to take the "sEquipUserName" and create a list that is comma deliminated. I'm going to pass it into a new value called "sDesktopUserList" but I can't get the code right.
Can anyone tell me what I am doing wrong?
Code:
For Each Field In Request.Form
If InStr(Field,"D_")>0 Then
id = Mid(Field,3)
sEquipUserName = Trim(Request.Form("D_" & id))
If sEquipUserName <> "" Then
Call AddEquipUsers(sEquipReqNbr, sEquipTypeNbr, sEquipUserName)
sDesktopUserList = sEquipUserName
sDesktopUserList = sDesktopUserList & ", " & sDesktopUserList
Else
End If
End If
Next
Can anyone tell me what I am doing wrong?