Thanks for the replies.
Sorry Bob, when talked about preventing the form submission, I was of course
talking about handling the form submission.
Currently I'm trying to handle these on a case-by-case basis, since the
context varies quite a bit.
Generally, when adding a new record, I'm trapping where possible when this
record already exists. When the operation updates a record, it isnt so much
of a problem - the timestamps are out by a few seconds perhaps but little
damge can be done. Likewise for Delete operations; if you have deleted a
record, there is little further damage you can do.
The problem I have is with Identity fields. I am tracking items with unique
serial numbers around a system; as part of this we have a Stockmovements
table which records when an item is moved from place to place. Clearly, ithe
the Primary Key being an Identity field, we can't easily check if the record
has already been added (by looking at the data).
I'm working on a session variable-based method whereby at the start of the
operation a flag is set, and cleared after the operation is completed. If
the user re-submits it will detect this. (I think Bob hinted at this
approach as well)
I'm sure it's not fool-proof, but it will cut out the vast majority of
mistakes (I hope).
Chris