I have an excel invoice sheet and I want to write the information from the invoice to a table in an Access file. My following code is:
Private Sub Button66_Click()
Dim con As New ADODB.Connection
Dim connectionString As String
Dim sql As String
connectionString = "DBQ=c:\Users\Public\Public Desktop\InvoiceRecords.mdb; Driver={Microsoft Access Driver (*.mdb)};"
con.Open connectionString
sql = "insert into Invoices (Customer, Address) values(G6, G7)"
con.Execute sql
MsgBox "Values entered", vbInformation
con.Close
Set con = Nothing
End Sub
However, when I run it I get a runtime-error '-2147217904 (80040e10)'; Too few parametersentered. I'm not what sure what this is. Any ideas or suggestions? Thanks a bunch!