Modify appearance of msgbox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to change the background color and font of a Msgbox/InputBox.
I've coded several Msgbox/InputBox's in my database but would like to change
the standard gray color. Or is the only way to create a form, instead of
using the Msgbox/InputBox function?
 
How do I change the default colour scheme? I know how to change the color of
a form, but my msgbox is a result of clicking a command button. How do I
change only the message box and not the actual form? I appreciate your help.
 
jojo said:
How do I change the default colour scheme? I know how to change the
color of a form, but my msgbox is a result of clicking a command
button. How do I change only the message box and not the actual
form? I appreciate your help.

You can't. The message box appearance is controlled by the Windows appearance
settings (themes and such).
 
The best way to do this would be through a function, say for example, funtion
inputbox()
Create a custom form, with the Other: Popup and Modal settings on 'yes'. Use
the function to load this 'fake' popup box, with say a textbox and a button.
Then, you can (I think, not entirely sure I must admit) set Inputbox() to be
the value of the textbox when you click the button, and load the other forms
etc.

For example, say you want to set the Name of txtName, using this pop-up.

Sub Whatever_Click()
txtName.Text = Inputbox()
end sub

Function Inputbox()

doCmd.OpenForm YourNewForm
 
Just realised that my first answer was ambiguous... the "yes" was to the
bit of my answer regarded your suggestion to create a custom form.

(Really just agreeing with Rick and Chad.... just making sure that my
original answer wasn't misunderstood. You'd have to change the entire
Windows colour scheme to get a standard msgbox to display in different
colours.)
 
Thank you all!

Rob Oldfield said:
Just realised that my first answer was ambiguous... the "yes" was to the
bit of my answer regarded your suggestion to create a custom form.

(Really just agreeing with Rick and Chad.... just making sure that my
original answer wasn't misunderstood. You'd have to change the entire
Windows colour scheme to get a standard msgbox to display in different
colours.)
 
Back
Top