Customize Message Box Button Text

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
 
G

Graham Mandeno

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.
 
T

Tony

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top