Hi
Can anyone tell me how i can get around with this piece of code.
Everything seems to be correct but when the program reaches cn.open it shows an error message saying "Authentication Failed". I have used no password and username. I've even tried creating different version of Access format (97 and 2000) but still it gives the same error. I've been stuck with this problem for two days.
Can anyone please help me with the below code.
VB Code:
Private Sub Form_Load() Me.MousePointer = 11 'this makes the mouse pointer the hourglass Set cn = New ADODB.Connection cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "D:\Usama\db\db97.mdb" cn.Open Set rs = New ADODB.Recordset rs.Open "ChkList", cn, adOpenKeyset, adLockPessimistic, adCmdTable rs.MoveFirst Do Until rs.EOF = True cn.AddItem rs.Fields("Field1") rs.MoveNext Loop rs.MoveFirst fillFields Me.MousePointer = 0 'sets the mouse pointer to the normal arrow End Sub
Thanks




Reply With Quote