open recordset

  • Thread starter Thread starter Shirley
  • Start date Start date
S

Shirley

I am running my DB on Access 2000. I need to open a
recordset, but have not been able to do it yet.

The code I am using like this:

Dim rstEmployees As ADODB.Recordset
rstEmployees.open "test", CurrentProject.Connection,
adOpenKeyset, adLockOptimistic
Set rstEmployees = CurrentDb.OpenRecordset("open")

It just doesn't work. Any help is greatly appreciated.

Thanks,

Shirley
 
Your syntax is wrong:

Dim rstEmployees As ADODB.Recordset
Set rstEmployees = New ADODB.Recordset

rstEmployees.open "test", CurrentProject.Connection,
adOpenKeyset, adLockOptimistic
 
Back
Top