in reply to Re^2: Altering SQL code from Update to Insert
in thread Altering SQL code from Update to Insert
Out of thin air, just like it wasn't in your code. Usually, you already know if you're updating or inserting a record on what the user wants to do. If you don't know, you could try to do an INSERT, and if that fails, try to do an UPDATE.