For "update" just use the same code as cmdAdd_Click, but without the AddNew line.