I worked it out.

I have to close the database after taking the ID and reopen it to modify it.