Records added when form is set to No Additions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form with a subform. Both the form and subform have their
properties set to No Additions, No Deletions. However, whenever I go to
Record A, then to Record B, then back to Record A and exit the form, I find
that a new record has been written to the database. The form and subform is
based on a select query of two tables with a one-to-one relationship. Any
suggestions would be appreciated .........just keep them simple enough for
someone between beginner and intermediate levels :)
 
Just moving record does not create a new one, so there must be something -
code? macro? - in one of the event procedures that is dirtying the record so
the new record gets created.

A typical mistake is code in the form's Current event that dirties the
record.

Once the new record is dirty, Access is sensible enough to allow it to be
saved even if the form's AllowAdditions property is set to No.
 
The only existing code is for a couple of command buttons (refresh and close
form). However, in quite a new twist, I found that it will not only ADD
records, but DELETE them as well! I'm using a combo box to select the name
of the person I'm looking for in the DB, it shows up just fine in the
subform, but what happens to the record after that is a pure mystery: It
will either make another record or now, delete every record associated with a
particular name. Personally, I'm beginning to think the thing is possessed
by demons.....
 
Well, I checked both the form and subform for underlying code. There is
none. The "Events" tabl is devoid of anything on both (the exception being
the two command buttons to "Refresh" and "Close the Form" built with the
wizard).

Let me know if you come up with any other possibilities.
 
Back
Top