open recordset

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
 
S

Scott McDaniel

Your syntax is wrong:

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

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

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