Deleting Records With Referential Integrity Set

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Steve

    Deleting Records With Referential Integrity Set

    In AccessXP in Access2000 mode ---

    TblCustomer: CustomerID, CustomerName
    TblOrder: OrderID, CustomerID, OrderDate
    TblOrderDetail: OrderDetailID, OrderID, Detail

    Appropriate relationships are established and referential integrity is enforced.

    FrmCustomer/SFrmOrder is a form/subform based on the respective tables.

    It doesn't matter if you put a button on the main form or a button on the
    subform and it doesn't matter if you use the code:
    DoCmd.RunComman d acCmdDeleteReco rd

    or

    DoCmd.DoMenuIte m acFormBar, acEditMenu, 8, , acMenuVer70
    DoCmd.DoMenuIte m acFormBar, acEditMenu, 6, , acMenuVer70

    when you try to delete the current record in the subform and that record has
    related records in TblOrderDetail, error 3200 arises as expected. Then it
    doesn't matter whether you trap this error or not, when you next try and go to
    another record in the main form using the navigation buttons, Access throws up
    another error that says "Operation Not Supported In Transactions".

    I checked other form/subform systems with a delete in the subform in the same
    database as well as in several other databases and all acted the same way
    throwing up the transactions error when trying to go to another record in the
    main form after a deletion try.

    Has any one else experienced this? Have you tried in your applications to go to
    another record in the main form after trying to delete a record in the subform?

    Steve


Working...