Enlazar una base de datos en access 2000 a visual basic
Estoy realizando una ventana de altas donde la información de los text box en visual basic se guarde en una base de datos creada en access 2000 (lo que pasa es que al hacer las validaciones cuando intenta guardar me envía el error en el refresh del objeto adodc1 marcada con negritas ) espero alguien me pueda ayudar porque me sale el error y en algunas ocasiones guarda y en otras me envía el error
Private Sub Command1_Click()
If Len(Trim(Text1.Text)) = 0 Then
MsgBox "ingrese el numero", vbExclamation
Text1.SetFocus
Exit Sub
End If
If Len(Trim(Text2.Text)) = 0 Then
MsgBox "ingrese el numero", vbExclamation
Text2.SetFocus
Exit Sub
End If
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select * from tabla2 where 'numi = " & Text1.Text
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
MsgBox "ya existe un registro con esa numeracion", vbExclamation
Text1.SetFocus
Text1.SelStart = 0
Text1.SelLength = Len(numi)
Exit Sub
End If
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields(numi) = Text1.Text
Adodc1.Recordset.Fields(nombre) = Text2.Text
Adodc1.Recordset.Update
Adodc1.Refresh
End Sub