View Full Version : Message boxes


Robert C
07-24-2000, 07:30 AM
Sorry - very simple question.

How do I get a message box with just an OK button on it to appear when a form opens?

Thanks

Robert Dunstan
07-24-2000, 07:36 AM
Try creating a macro which uses the MsgBox action. Here you can create your custom message etc. Attach this macro to your form's OnOpen event.

I think I'm right in saying that VB's default message box style is vbOKOnly i.e. it only has an OK button.

Hope this helps

Robert Saye
07-24-2000, 07:39 AM
Open your form in design view, and right click on the upper left corner of the form and call up the proreties for the form. Go to the events tab and choose OnLoad then hit the ellipse (...) to the right of this box. This will take you to the VB screen, now just type:
msgbox "Whatever you want to say here"

Then save it, Access msgbox's default to just an OK button.


HTH
Robert