This should work, I am still a beginner at SQL myself, but the syntax looks correct.
This should be the onclick() event of the button that you added to your form:
Code:
DoCmd.SetWarnings False
DoCmd.RunSQL "INSERT INTO *tableName you are inserting into* (Quantity, Code) VALUES('" & Me.Quantity & "', '" & Me.Code & "')"
DoCmd.RunSQL "Delete *tableName you are deleting from* (Quantity,Code) Values ('" & Me.Quantity & "', '" & Me.Code & "')"
DoCmd.SetWarnings True
And make sure you add the table that you are wanting to insert into, and that is assuming that the name of the fields on your form are Quantity, and Code