Hello,
Bob had suggested that I use the Chr(34) format instead of the quotes but I could not get that to work. maybe I have been looking at this code too long but could someone tell me if they see a mistake with this? I am still getting the "Run-Time Error 3346"
While Not rs.EOF
sqlinsert = "INSERT INTO Pending_Tbl (Account_Number, Client_Name, Branch, Primary_FA_num, New_Subcategory_ID, DT_Code_Changed, Email, Dt_Contract_Received, Pending_Notes) VALUES ('" & rs.Fields("Account_Number") & "','" & Replace(rs.Fields("Client_Name"), "'", "''") & "', '" & rs.Fields("Branch") & "', '" & rs.Fields("Primary_FA_num") & "', '" & rs.Fields("New_Subcategory_ID") & "', '" & rs.Fields("DT_Code_Changed") & "', '" & Replace(rs.Fields("FA_Email_Address"), "'", "''") & rs.Fields("Dt_Contract_Received") & "', '" & rs.Fields("Pending_Notes") & "');"""""
db.Execute (sqlinsert)
rs.MoveNext
Wend
Any help you could give I would really appreciate. Thank you !!
Bob had suggested that I use the Chr(34) format instead of the quotes but I could not get that to work. maybe I have been looking at this code too long but could someone tell me if they see a mistake with this? I am still getting the "Run-Time Error 3346"
While Not rs.EOF
sqlinsert = "INSERT INTO Pending_Tbl (Account_Number, Client_Name, Branch, Primary_FA_num, New_Subcategory_ID, DT_Code_Changed, Email, Dt_Contract_Received, Pending_Notes) VALUES ('" & rs.Fields("Account_Number") & "','" & Replace(rs.Fields("Client_Name"), "'", "''") & "', '" & rs.Fields("Branch") & "', '" & rs.Fields("Primary_FA_num") & "', '" & rs.Fields("New_Subcategory_ID") & "', '" & rs.Fields("DT_Code_Changed") & "', '" & Replace(rs.Fields("FA_Email_Address"), "'", "''") & rs.Fields("Dt_Contract_Received") & "', '" & rs.Fields("Pending_Notes") & "');"""""
db.Execute (sqlinsert)
rs.MoveNext
Wend
Any help you could give I would really appreciate. Thank you !!