Cita: Option Explicit
Private cnn As ADODB.Connection
Private rst As ADODB.Recordset
Private Sub cmdAbrir_Click()
Dim tField As ADODB.Field
Dim N as integer
Set cnn = Nothing
Set rst = Nothing
Set cnn = New ADODB.Connection
Set rst = New ADODB.Recordset
cnn.Open "Provider=SQLOLEDB; " & _
"Initial Catalog=pubs; " & _
"Data Source=proxlnx\SQLEXPRESS; " & _
"integrated security=SSPI; persist security info=True;"
'se ejecuta la centencia sql insert into
cnn.execute = "insert into tabla values('campo1','campo2')", N
if N<>0 then msgbox "Se ingreso nuevo registro correctamente", vbinformation
End Sub
te recomiendo que busques y leas un manual de sql ya que para cualquier tipo de consulta distinta a un select se usa el execute y esas son centensias sql
que estes bien
bendiciones =)