Results 1 to 3 of 3
  1. #1
    Join Date
    May 2009
    Posts
    2

    Unanswered: Delete Button Help- with subforms

    Okay so I am fairly new to this and was thrown into an allready built Database. I need to add a button to delete records in a subform. I would like to add the button in the subform but have it delete the record in the subform and in another Subform contained in the first Subform.

    I was wondering if anyone can help me write I VB code for this because everytime I try it either does nothing or tells me that it the comman is not available.
    The Main Forms name is:
    frmMain and links to the subform through a CustomerID #
    The Subforms names are:
    sfClaims & sfNotes
    They are linked by an AutoGenerated ClaimID #.

    I want the Button to delete the record in sfClaims and the linked record in sfNotes but not affect the Main Form. Also I would like it to ask if the person clicking is sure they want to delete Yes/No.

    Thank you for any help you can offer.

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Quote Originally Posted by phantasm
    The Main Forms name is:
    frmMain and links to the subform through a CustomerID #
    The Subforms names are:
    sfClaims & sfNotes
    They are linked by an AutoGenerated ClaimID #.
    Which is it that links what to where? I am confused

    Shouldn't be that hard to code. Speaking of which... where is the code you've tried? If you post that up, I/we can help you determine where you went wrong, why etc so that you are able to do this yourself next time
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    May 2009
    Posts
    2

    Problem Solved

    I guess it would help if I allowed deletions in the subform and also I was using end sub instead of exit sub so it could not make it to the error message.
    If any one else needs similar coding please let me know and I will post it.

    Thanks

Posting Permissions

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