Problem with DAO Field UPDATE

  • Thread starter Thread starter John Cosmas
  • Start date Start date
J

John Cosmas

I have created a recordset using a SELECT statement that looks like this,
using DBOPENDYNASET

Set prstTest = CurrentDb.OpenRecordset("SELECT 0 AS IsSelected, * FROM
QRY_CUSTOMERS")

Later in my code, I would like to change to change/UPDATE the ISSELECTED
column from a 0 to 1. I used the .EDIT and set the value to 1, plus I added
the .UPDATE after I am done. Unfortunately, the row/column did not not get
updated. Help.

John
P.S. - The ISSELECTED is not part of the original table to QUERY; it is
added into the SELECT statement when opening the recordset
 
John, this approach is not going to work.

You assigned a literal value to the field, but there is nowhere this value
is stored as Access pages the records in and out of memory.

You can verify that the field is not updatable like this:
Debug.Print prstTest.Fields("IsSelected").DataUpdatable
 
Back
Top