Results 1 to 2 of 2

Thread: delete

  1. #1
    Join Date
    Apr 2006
    Posts
    20

    Unanswered: delete

    i designed a form based on table "main" , , i inserted a subform called "Events" using table "events" and they are related to each other using ID MASTER FIELD- idrelation CHILD field , how can i insert a button on the form when i click it , it deletes the records in events that are related only in main

  2. #2
    Join Date
    Jul 2005
    Posts
    144
    Make a button and use this code on the onclick event of the button
    Private Sub Command26_Click()
    On Error GoTo Err_Command26_Click


    DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
    DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

    Exit_Command26_Click:
    Exit Sub

    Err_Command26_Click:
    MsgBox Err.Description
    Resume Exit_Command26_Click

    End Sub

    hope this helps

Posting Permissions

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