Adding a Field - error in value

Adding Field 5 name Concatenation --Text getting error Syntax error.   This is the value I added  cell. Offset(0, 5).Value & "',")

Here all the code:
Const dbConStr As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\DTCHYB-ILSP001\C_MTG_Groups\Mandatory\Analysts - Working Files\Carol\Expert\LSB_analysis.accdb;Persist Security Info=False;"

Sub CopyToAccess()
Dim ws As Worksheet
Dim dbConn As Object
Dim dbCmd As Object
Dim lr As Long
Dim rng As Range, cell As Range

Set ws = Sheets("Sales_Summary")
lr = ws.Cells(Rows.Count, "BA").End(xlUp).Row
Set rng = ws.Range("BA1:BA" & lr)

Set dbConn = CreateObject("ADODB.Connection")
Set dbCmd = CreateObject("ADODB.Command")

On Error GoTo ErrHandler
dbConn.ConnectionString = dbConStr
dbConn.Open
dbCmd.ActiveConnection = dbConn
On Error GoTo 0

For Each cell In rng
   On Error GoTo DataNotInserted
   dbCmd.CommandText = "INSERT INTO Daily_Historical_Bid_Log (Trade_Date,Trade_Month,ClientID,Client,Tape_Amt,Concatenation) VALUES (" & _
                     "#" & cell.Value & "#," & _
                     "'" & cell.Offset(0, 1).Value & "'," & _
                     cell.Offset(0, 2).Value & "," & _
                     "'" & cell.Offset(0, 3).Value & "'," & _
                     cell.Offset(0, 4).Value & ")"
                     cell.Offset(0, 5).Value & "',")
   dbCmd.Execute
Next cell
MsgBox "Data has been successfully inserted into Access Table.", vbInformation, "Done!"
Exit Sub

DataNotInserted:
MsgBox "Record is not inserted." & vbNewLine & Err.Number & vbNewLine & Err.Description
dbConn.Close
ErrHandler:
MsgBox "Something went wrong, unable to connect to the Access Database. " & vbNewLine & _
       Err.Number & vbNewLine & Err.Description

End Sub

Open in new window

Copy-of-CopyExportToAccess.xlsm
LSB_analysis.accdb
ValueError.docx
ca1358Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

aikimarkCommented:
Please try this:
dbCmd.CommandText = "INSERT INTO Daily_Historical_Bid_Log (Trade_Date,Trade_Month,ClientID,Client,Tape_Amt,Concatenation) VALUES (" & _
                     "#" & cell.Value & "#," & _
                     "'" & cell.Offset(0, 1).Value & "'," & _
                     cell.Offset(0, 2).Value & "," & _
                     "'" & cell.Offset(0, 3).Value & "'," & _
                     cell.Offset(0, 4).Value & ")," & _
                     "'" & cell.Offset(0, 5).Value & "'")

Open in new window

ca1358Author Commented:
It turn all RED.
Second_ValueError.docx
ca1358Author Commented:
took the ) of this line   "'" & cell.Offset(0, 5).Value & "'") but now error read Record is not inserted. -2147217900 Number of qury values and destination fields are not the same.
aikimarkCommented:
Misplaced right parenthesis character.  Please test this:
dbCmd.CommandText = "INSERT INTO Daily_Historical_Bid_Log (Trade_Date,Trade_Month,ClientID,Client,Tape_Amt,Concatenation) VALUES (" & _
                     "#" & cell.Value & "#," & _
                     "'" & cell.Offset(0, 1).Value & "'," & _
                     cell.Offset(0, 2).Value & "," & _
                     "'" & cell.Offset(0, 3).Value & "'," & _
                     cell.Offset(0, 4).Value & "," & _
                     "'" & cell.Offset(0, 5).Value & "')")

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ca1358Author Commented:
Thank you!!!!!!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.