Use the .Fields.Append method to add the fields that you need. Then the .addnew method to add a record and set the field values, don't forget to update the recordset.
Code:
Set rs = New ADODB.Recordset
With rs
.Fields.Append "Name", adVarChar, 120
.Fields.Append "Address", adVarChar, 120
....
End With
With rs
.AddNew
.Fields(0).value = <Name>
.Fields(1).value = <Address>
...
.Update
End with
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.