Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Frederick, Maryland, USA
    Posts
    296
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Deleting Records in a Subform (A2K R1)

    How do I delete a record from a subform?

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Deleting Records in a Subform (A2K R1)

    The easiest way is to click on the RecordSelector for that record, then hit the delete key. There are other ways, but it depends on the situation. Maybe you could explain more of what you want to do?
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Frederick, Maryland, USA
    Posts
    296
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Deleting Records in a Subform (A2K R1)

    I have a form/subform combination that presents Purchase Order information on the main form and line items for that Purchase Order on the subform. When I try to delete a subform record, I'm presented with "Records cannot be deleted on this form". Is this because I have Cascade Delete Related Records selected? I don't want to delete the record in the primary table, just one of the related records in the related table.

  4. #4
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    USA
    Posts
    379
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Deleting Records in a Subform (A2K R1)

    Are you saying that the one to many relationship between PurchaseOrder and LineItem table has Cascade Deletes enabled?
    If so, that should not prohibit you from deleting a LineItem. Is the LineItem table related to other tables? Is the subform bound to the LineItem table? Check to make sure the forms have the Allow Deletions property set to Yes.

  5. #5
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Deleting Records in a Subform (A2K R1)

    >>Is this because I have Cascade Delete Related Records selected? <<

    No. I think you probably set the AllowDetions property on your subform to False.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  6. #6
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Altnau, Thurgau, Switzerland
    Posts
    447
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Deleting Records in a Subform (A2K R1)

    Can you delete a record in the query the sub form is based on? Sometimes with the collecting and preparing of information in a query one creates a query that can only display data, not modify it.

Posting Permissions

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