Problem in form with ADO

  • Thread starter Thread starter alecarnero
  • Start date Start date
A

alecarnero

I have write this code for populate one access form , i m working with
access XP,

Private Sub Form_Load()
DoCmd.Maximize

Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset

Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset

cn.Provider = "Provider=Microsoft.Jet.OLEDB.4.0"
cn.ConnectionString = "Data Source=E:\work\center\cadastro.mdb"
cn.Open

rs.Open "tbcliente", cn, adOpenDynamic, adLockReadOnly, adCmdTable

rs.MoveFirst
rs.close
cn.close

End Sub

I have this error "3706" "Provider cannot be found"

Thanks in advance

Alejandro Carnero
 
Back
Top