Getting an extra record in my datasheet

  • Thread starter Thread starter Joe
  • Start date Start date
J

Joe

I am putting together an Access database for the first
time in a long time, and I guess I'm rusty. I have set
the form up to show the previous record's values since
much of the data to be entered will be identical.
However, when I exit the form, and check the worksheet and
table, I have a repeat of the last entry. How can I
prevent that??

Thanks, Joe [20030829]
 
I am putting together an Access database for the first
time in a long time, and I guess I'm rusty. I have set
the form up to show the previous record's values since
much of the data to be entered will be identical.

How are you doing this? Copying the values from the previous record
into the Form? If so, you're copying them into the table.
However, when I exit the form, and check the worksheet and
table, I have a repeat of the last entry. How can I
prevent that??

By closing the Form *ONLY* from a command button, and including a line
Me.Undo as part of that code. By default, closing a form writes the
record to disk.
 
Without much info., my guess is that on NewRecord, your code assigns values
to these Controls. Since Access Form automatically saves the CurrentRecord,
the NewRecord with values assigned by your code is saved and you ended up
with an extra Record at the end.

You should set the *DefaultValue* of the Controls rather than the Values.

One method is available in the Microsoft KB:

http://support.microsoft.com/?id=210236
 
Back
Top