updating/editing a recordset

  • Thread starter Thread starter Dawn
  • Start date Start date
D

Dawn

When a record is added to a form a few of the fields are
added to a different table (table2) if a particular
criteria is met.

To add the fields to table2 I am using a recordset and the
AddNew method. If the record is deleted, referential
integrity is enforced (cascade delete).

The problem is when the value of one of those fields is
changed -the result is another record is added to table 2.

I've tried using the recordset and the edit method but the
extra record is still added.

How do I correct this?

Thanks for you help
 
Dawn said:
When a record is added to a form a few of the fields are
added to a different table (table2) if a particular
criteria is met.

To add the fields to table2 I am using a recordset and the
AddNew method. If the record is deleted, referential
integrity is enforced (cascade delete).

The problem is when the value of one of those fields is
changed -the result is another record is added to table 2.

I've tried using the recordset and the edit method but the
extra record is still added.


Where is the code you're using to add the new record to
table2? It sounds like you have it in the form's (or a
control's) AfterUpdate event when it should be in the form's
AfterInsert event.
 
Back
Top