Customize Message Box Button Text

  • Thread starter Thread starter Tony
  • Start date Start date
T

Tony

Anyone know if there is a way to customize the text that appears on buttons
in a message box? For example, I want something like this. The message box
tells the user that they are about to enter a duplicate record. The options
(buttons they can click) they have are: Add Record - Edit Existing Record -
Start Over.

Thanks & Ciao,

Tony
 
Hi Tony

No, this cannot be done with a standard MsgBox, but it is quite easy to
invent your own.

Create a form with the controls on it that you require. Open the form
modally (Windowmode:=acDialog), passing variables such as message text via
OpenArgs if required. Have each of your buttons set the value of a hidden
textbox on your form and then set Me.Visible=False.

The calling code can then extract the response value and close the form.
 
Graham,

Thanks for the response. I'm going to see how things work by following the
suggestion Mike and you made. Since this isn't a top priority task, I have
time to 'play' with it.

Thanks again & Ciao,

Tony


Graham Mandeno said:
Hi Tony

No, this cannot be done with a standard MsgBox, but it is quite easy to
invent your own.

Create a form with the controls on it that you require. Open the form
modally (Windowmode:=acDialog), passing variables such as message text via
OpenArgs if required. Have each of your buttons set the value of a hidden
textbox on your form and then set Me.Visible=False.

The calling code can then extract the response value and close the form.

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Tony said:
Anyone know if there is a way to customize the text that appears on buttons
in a message box? For example, I want something like this. The message box
tells the user that they are about to enter a duplicate record. The options
(buttons they can click) they have are: Add Record - Edit Existing Record -
Start Over.

Thanks & Ciao,

Tony
 
Back
Top