Public Sub addCustomerArray()
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Set conn = CurrentProject.Connection
Set rs = New ADODB.Recordset
rs.Open "tblCompany", conn, adOpenDynamic, adLockOptimistic, adCmdTable
varfields = Array("CompanyName", "Address", "City")
varValues = Array("A", "Road", "B")
rs.AddNew varfields, varValues
rs.Update
End Sub
|