Captions of buttons in msgbox

  • Thread starter Thread starter ACCESS
  • Start date Start date
A

ACCESS

is there any way to change the caption of OK and Cancel in a msgbox
programmatically with a desired font ?
or is there any way to make a function to act like msgbox which can be
called from inside of an event?

Thanks in advance for any assistance.
Regards,
Reza Daneshvar
 
No, the font is set by the Regional settings.

However, whenever you want the ability to manipulate a "message box", it's
better to create your own form with your own fonts, etc. and then you can
display it in dialog mode just like a message box would be.
 
thanks for your attention Ken. However, the problem is that there is no way
to pause an event procedure with your own message box. I tried your
suggestion before, when the program enters to such this event the process
continues after showing message box and when all of commands in event
procedure are done the control will return to message box.

Reza Daneshvar
 
But there is a way to pause things with your own message box form. Open that
form in Dialog mode:

DoCmd.OpenForm "MessageBoxForm", , , , , acDialog

Your code will stop running until the form is either hidden or closed. Note
that you'll need to put code in the message box form to handle the choice
made, or else you'll need to put a value into a hidden textbox on the form
that is filled by the button selected, and then hide the message box form so
that your code can read that value and then close the message box form from
your original code.
 
Back
Top