Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can't Get Rid of an Error Message (2003)

    In the startup form of the attached mdb, please click the "Delete Last Day" button which carries out the deletion of the last day in the form. The procedure runs to completion but I get a message at the end saying, "Record deleted".
    I've tried to get rid of the message by putting an "On Error Resume Next" at the Exit_Comando143_Click: line label in the Comando143_Click Sub
    to no avail.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Can't Get Rid of an Error Message (2003)

    It's not a standard error message, because the error handler is not invoked. I'd live with it.

    You don't need to close and reopen FDezzo, you only need to go to the last record:

    Private Sub Comando143_Click()
    On Error GoTo Err_Comando143_Click

    If MsgBox("Sei sicuro di voler cancellare l'ultimo giorno?", _
    vbQuestion + vbYesNo, "Attenzione!") = vbYes Then
    DoCmd.SetWarnings False
    DoCmd.OpenQuery "QueryDelPrev", acNormal, acEdit
    DoCmd.OpenQuery "QueryDelPersonale", acNormal, acEdit
    DoCmd.OpenQuery "QueryDelMeteo", acNormal, acEdit
    Me.Cdata = DMax("Giorno", "previsioni")
    DoCmd.SetWarnings True
    End If

    Exit_Comando143_Click:
    Exit Sub

    Err_Comando143_Click:
    MsgBox Err.Description
    Resume Exit_Comando143_Click
    End Sub

    When are you going to give your controls meaningful names?

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Can't Get Rid of an Error Message (2003)

    Thank you Hans, I'll try my best as far as giving my controls meaningful names <img src=/S/blush.gif border=0 alt=blush width=15 height=15> <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

Posting Permissions

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