ADO recordset can not be updated

K

Kevin

I am using the code to bind an ADO record set from an SQL db:

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

'Use the ADO connection that Access uses
Set cn = CurrentProject.AccessConnection

'Create an instance of the ADO Recordset class, and
'set its properties
Set rs = New ADODB.Recordset
With rs
Set .ActiveConnection = cn
.Source = " Select ServiceRequestNumber, ServiceRequestName,
TaxonomyID, ProgramID, Capitalizable, CarryOver, Comment From
dbo.SR_Master_Data Where UpdateNeeded = 1"
.LockType = adLockOptimistic
.CursorType = adOpenKeyset
.CursorLocation = adUseClient
.Open
End With

'Set the form's Recordset property to the ADO recordset
Set Me.Recordset = rs

I can not update any of the data fileds on the form.
Any ideas?

Thanks Kevin
 

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