Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Msg Box Code

Discussion in 'Information Technology' started by James New, Oct 29, 2005.

Tags:
  1. James New

    James New
    Expand Collapse
    Guest

    I am trying to reset my form to a new record when the Retry button is pressed
    on the message box that comes up on an error, I wrote the code to bring the
    msg box up, but now I am stuck and can not figure out how to activate ther
    retry button. Can someone please aid me in the task?
     
  2. Loading...


  3. Dirk Goldgar

    Dirk Goldgar
    Expand Collapse
    Guest

    "James New" <JamesNew@discussions.microsoft.com> wrote in message
    news:4F71E35A-6036-45C0-900E-AE77F73103C9@microsoft.com
    > I am trying to reset my form to a new record when the Retry button is
    > pressed on the message box that comes up on an error, I wrote the
    > code to bring the msg box up, but now I am stuck and can not figure
    > out how to activate ther retry button. Can someone please aid me in
    > the task?


    Something like this:

    If Msgbox( _
    "What do you want to do?", _
    vbRetryCancel + vbQuestion, _
    "Well?") _
    = vbRetry _
    Then
    Me.Undo
    If Not Me.NewRecord Then
    RunCommand acCmdRecordsGoToNew
    End If
    End If

    But obviously I don't know exactly what you're trying to do, or when
    you're trying to do it, so that's just a rough example.

    --
    Dirk Goldgar, MS Access MVP
    www.datagnostics.com

    (please reply to the newsgroup)
     
  4. James New

    James New
    Expand Collapse
    Guest

    Thank you for the help, that was exactly the information I needed to get me
    going again on this project.

    "Dirk Goldgar" wrote:

    > "James New" <JamesNew@discussions.microsoft.com> wrote in message
    > news:4F71E35A-6036-45C0-900E-AE77F73103C9@microsoft.com
    > > I am trying to reset my form to a new record when the Retry button is
    > > pressed on the message box that comes up on an error, I wrote the
    > > code to bring the msg box up, but now I am stuck and can not figure
    > > out how to activate ther retry button. Can someone please aid me in
    > > the task?

    >
    > Something like this:
    >
    > If Msgbox( _
    > "What do you want to do?", _
    > vbRetryCancel + vbQuestion, _
    > "Well?") _
    > = vbRetry _
    > Then
    > Me.Undo
    > If Not Me.NewRecord Then
    > RunCommand acCmdRecordsGoToNew
    > End If
    > End If
    >
    > But obviously I don't know exactly what you're trying to do, or when
    > you're trying to do it, so that's just a rough example.
    >
    > --
    > Dirk Goldgar, MS Access MVP
    > www.datagnostics.com
    >
    > (please reply to the newsgroup)
    >
    >
    >
     

Share This Page