Results 1 to 3 of 3
  1. #1
    raton is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Feb 2012
    Posts
    22

    Want custome msg when Delete record from a subform by clicking cmdbutton on main form


    i have a form with subform.
    subform in datasheet view
    when i select a row of the subform & click the cmdbutton(delete)
    access standart msgbox shows. but i want my msg

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Try:
    Private Sub Form_BeforeDelConfirm(Cancel As Integer, Response As Integer)
    'Suppress default Delete Confirm dialog box.
    Response = acDataErrContinue
    MsgBox "some text here", , "Delete"
    End Sub
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Also, in Help, read about the "Delete Event" (not OnDelete property) and the "BeforeDelConfirm Event" (not BeforeDelConfirm Property).

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 03-14-2012, 10:08 AM
  2. Replies: 11
    Last Post: 02-13-2012, 10:06 AM
  3. Replies: 13
    Last Post: 01-29-2012, 01:45 PM
  4. Replies: 5
    Last Post: 11-11-2011, 11:06 AM
  5. Replies: 1
    Last Post: 10-13-2010, 12:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums