Jim Lawrence (AccessD)
accessd at shaw.ca
Wed Jan 21 01:20:19 CST 2004
Hi Darren:
You have to make sure your DAO is referenced, the db object and rs recordset
object is dimensioned and the right type of object is used, that has edit
and update functionality.
Example:
Dim selSQL As String
Dim rs as DAO.recordset
Dim db as DAO.database
set db = CurrentDb()
set rs = db.OpenRecordset(selSQL, dbOpenDynaset)
... then everything should work just fine.
HTH
Jim
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Darren DICK
Sent: Tuesday, January 20, 2004 9:18 PM
To: AccessD List
Subject: [AccessD] A2K: Error 3251
Hi All
This should be simple
I have some code updating a table of records
Dim selSQL As String
Dim rs As Recordset
selSQL = "SELECT tblMyTable.* FROM tblMyTable;"
Set rs = db.OpenRecordset(selSQL, dbOpenSnapshot)
With rs
.Edit <===Code Fails Here
!MyField = Me.txtMyControl
.Update
End With
The rror I get is...
Error 3251: Operation is not supported for this type of Object
Any suggestions??
Many thanks
DArren
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com