Results 1 to 4 of 4
  1. #1
    Join Date
    May 2004
    Posts
    8

    Arrow Unanswered: Unintentional Row deletion upon [escape]

    Undo or escape sometimes delete a row, thus corrupting the data autonumbering, in spite of the fact that I have a macro disabeling deletion. Any other way to prevent it?

  2. #2
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Talking

    Quote Originally Posted by dskan
    Undo or escape sometimes delete a row, thus corrupting the data autonumbering, in spite of the fact that I have a macro disabeling deletion. Any other way to prevent it?
    Hi dskan,

    The Esc key only Deletes the record you ARE currently editing/adding. Until you move off of that record you will delete the information you placed in it BUT the AutoNumber will remain attached to THAT record. AutoNumber set as PrimaryKey stays with whatever record it is attached to, whether we like it or not. Maybe someday check on the forum here about creating your OWN AutoNumbering outside that of the one Access gives you. You'll be much happier.

    have a nice day,
    Bud
    Just a note before I go....remember this it is sometimes best to just take a record out of circulation by dropping it into an Inactive or Dead file section. That way you can still retrieve that file at a later date, and besides, if you wish and not much data was input, you can simply OVERWRITE the data that was in the associated fields. But just remember the other Record in the Other table it is attached to, if you have your Relationships set.

    cya

  3. #3
    Join Date
    May 2004
    Posts
    8
    Thanks Bud for answering me. At least I got an answer! Well i do go about this by simply renumbering the auto field (deleting the auto id field and then setting it again). Hope the new version of Access will overcome this , since when you are searching for a record it counts the current records shown and not the auto number.
    tks again.

  4. #4
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Cool

    Quote Originally Posted by dskan
    Thanks Bud for answering me. At least I got an answer! Well i do go about this by simply renumbering the auto field (deleting the auto id field and then setting it again). Hope the new version of Access will overcome this , since when you are searching for a record it counts the current records shown and not the auto number.
    tks again.
    dskan,

    If you choose to go about it that way, make sure you have set Referential Integrity with the CascadeUpdates/Deletes set to avoid many orphan records. Deleting and re-setting a field is a lot of work, not to mention might mess up data already tied to that field, IF that is the PrimaryKey. All prior records are tied to that number.

    have a nice one,
    Bud

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •