Msg Box Code

J

James New

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?
 
D

Dirk Goldgar

James New said:
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.
 
J

James New

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