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

Multi-Select List Box/Adding into Field

Status
Not open for further replies.

lexis7

Programmer
Sep 23, 2002
26
US
I am having a small issue with taking the values of a multi-select list box and entering them into one field of a table.

I copied the code from another post and it works -except, in the field it has the word "Select" in front of the selections.

I know this is from the SQL statement but I'm not sure how to change it so the word "select" doesn't show up in the field.

Thanks in advance for your help, the code I'm using is below!

Dim varRow As Variant
Dim strSQL As String
strSQL = "Select "
For Each varRow In lstRetailPartnerSite.ItemsSelected
strSQL = strSQL & lstRetailPartnerSite.Column(0, varRow) & ", "
Next varRow
rs![Retail Partner Sites] = strSQL
 
Instead of this line:
strSQL = "Select "
change it to:
strSQL = vbNullString
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top