Listbox questions

G

Guest

I have a listbox and want to update a field in my table, here is the code
that I am using:
Dim varvalue As Variant
Dim strList946 As String
Dim strSQL As String
For Each varvalue In Me.List946.ItemsSelected
strList946 = strList946 & Me!List946.Column(0, varvalue) & ", "
Next varvalue
strList946 = Left$(strList946, Len(strList946) - 2)
strSQL = "UPDATE Table![Part A] SET Table![Part A].[Dmgd prty] = '" &
strList946 & "'"
DoCmd.RunSQL (strSQL)

My problem is that I am getting an error message on the UPDATE - can
someone assist please?
 
G

Guest

Try and drop the (Table) from the SQL

strSQL = "UPDATE [Part A] SET [Part A].[Dmgd prty] = '" &
strList946 & "'"
DoCmd.RunSQL strSQL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top