Hello - I can't figure out why the following sql statement is causing this error:
Run-time error '3346': Number of query values and destinatino fields are not the same.
Here's the sql statement(its really long, 20 column fields, and 20 values...i define the variables used earlier in the code..)
apparently, the issue is not with the number of fields, because they match, but i dont know what else to check for...is the NZ function throwing things off??
any advice is super welcome!
Run-time error '3346': Number of query values and destinatino fields are not the same.
Here's the sql statement(its really long, 20 column fields, and 20 values...i define the variables used earlier in the code..)
Code:
strSQL = "INSERT INTO RFPCustomer(RFPID, ContactName, ContactNumber, ContactEmail, DateOrderReceivedOn, RequestedDueDate, FOCDate, TurnUpDate, InstallDate, OrderNumber, Interval_CID, Service_CID, DiscDueDate, Coding_CID, Framing_CID, ConnectorType_CID, LocalContactA, LocalContactB, contactnumbera, contactnumberb) VALUES('" & rs("rfpnumber") & "', '" & Nz(rs("ordercontactname"), "") & "', '" & Nz(rs("ordercontactnumber"), "") & "', '" & Nz(rs("ordercontactemail"), "") & "', '" & Nz(rs("orderreceivedon"), "") & "'" & _
"'" & Nz(rs("requestedduedate"), "") & "', '" & Nz(rs("finalfocdate"), "") & "', '" & Nz(rs("turnedupdate"), "") & "', '" & Nz(rs("installdate"), "") & "', '" & Nz(rs("customerordernumber"), "") & "', '" & interval_cid & "', '" & service_cid & "', '" & Nz(rs("plantdisconnectduedate"), "") & "', '" & coding_cid & "', '" & framing_cid & "', '" & connectortype_cid & "', '" & Nz(rs("localcontacta"), "") & "', '" & Nz(rs("localcontactz"), "") & "', '" & Nz(rs("contactnumbera"), "") & "', '" & Nz(rs("contactnumberz"), "") & "')"
DoCmd.RunSQL (strSQL)
apparently, the issue is not with the number of fields, because they match, but i dont know what else to check for...is the NZ function throwing things off??
any advice is super welcome!