• Deleted records reappearing? (2003)

    Author
    Topic
    #428252

    I’ve been having an odd problem with deleted records not staying deleted. I know it is customary to attach a sample database, however creating a sample would be a project in itself (the data is confidential, there are a lot of forms and reports in the database so even with a few records it would be rather large to attach, and the problem doesn’t always arise), so before going to that effort I thought I’d see if any of my points “ring a bell” with anyone.

    I have a database that has been operational for several years that has many tables, and many complex forms. I have an audit trail programmed in to document the reasons for record changes and deletions. That has worked fine as far as I know up until we switched from Access 2000 to 2003 (I haven’t converted the database format, so the database is still in 2000 format). Now, often but not always, if someone deletes a record (by clicking in the record selector bar on the left and then hitting DEL) my prompting in the On Delete event kicks in as it should, the record seems to go away (moving from record to record within the form no longer shows it), but if the form is closed, the records reselected and the form opened again, the “deleted” record is back again!

    Several points
    – As I said, this often, but not always, happens.
    – So far, it looks like it’s only been happening in forms that have subforms, but I’m not absolutely positive it can’t happen elsewhere because as I said it’s erratic, and we don’t often delete records anyway.
    – I can’t absolutely promise it’s specific to Access 2003 (given it’s erratic nature and the only occasional need to delete records), but we didn’t notice it before switching to 2003.
    – Sticking my auditing in the Before Del Confirm event SEEMS to so far be working better, but I’m still concerned and from a coding point of view I’d prefer doing my auditing in the On Delete event.
    – I could be right out to lunch, but I’m suspicious that the problem relates to me writing auditing records “behind the scenes” in the middle of a record deletion.

    So, before I do some major work coming up with a non-confidential concise example, has anyone run into problems with deleted records not staying deleted in Access 2003?

    Viewing 0 reply threads
    Author
    Replies
    • #994589

      Are you cascading deletes in the table relationships for the records? If you don’t have cascading deletes turned on and you DO have relational integrity enforced, records in the child level will keep you from deleting parent records.

      • #994598

        Yes, they’re turned on. In any case, I’m not getting any error messages pertaining to related records (like I’ve had in other databases when I haven’t turned on cascaded deletes). As well, it’s also happened when only a record in the subform is selected and deleted (so cascading deletes would be immaterial in that case).

    Viewing 0 reply threads
    Reply To: Deleted records reappearing? (2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: