View Single Post
  #2  
Old May 10th, 2004, 04:42 AM
Graham Mandeno
external usenet poster
 
Posts: n/a
Default Avoid Creating A Duplicate Record

Hi Mark

If you set the values in the new record by setting the DefaultValue for each
control, instead of the Value, then the new record will not become dirty
until the user types in some changes.

The one catch is that the DefaultValue property is always a string
expression, so strings and dates must be enclosed in quote marks.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

"Mark" wrote in message
nk.net...
When my form goes to a new record, I have a procedure that copies the last
record added to the form's underlying table into the form. The intent is

that a
series of new records may have the same data in many of the fields so I

paste in
the same values of the previous record and then edit what needs edited in

the
new record saving much retyping of the same data. Doing this however

creates the
definite possibility of creating a duplicate record. If after copying the
previous record, no fields are edited, a duplicate record of the previous

record
is created. I'm looking for a way to detect if the new record has been

edited
after a copy of the previous record has been added to the form. I checked

the
Dirty property and the form is dirt after adding the copy of the previous

record
so using the dirty property seems to be out. Does anyone have any idea on

what I
can do?

Thanks!

Mark