[AccessD] A2K: Error 3251

Darren DICK d.dick at uws.edu.au
Wed Jan 21 17:49:04 CST 2004


Thanks to all who responded
dbOpenDynaset was the answer as opposed to dbOpenSnapshot

Thanks Guys
This list is great

DD

----- Original Message ----- 
From: "Jim Lawrence (AccessD)" <accessd at shaw.ca>
To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com>
Sent: Wednesday, January 21, 2004 6:20 PM
Subject: RE: [AccessD] A2K: Error 3251


> 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
> 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com


More information about the AccessD mailing list