Problem in form with ADO

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top