View Full Version : Custom buttons in message box


aqif
04-18-2002, 07:54 PM
Hi http://www.access-programmers.co.uk/ubb/smile.gif

Is it possible to have your custom buttons on message box which says like

Insert Print Cancel

Then can you refer like

If Msgbox("---",--,"--")=VbButton1 or VbInsert

First of all am I making sense ? http://www.access-programmers.co.uk/ubb/smile.gif and secondly is it possible?

Cheers!
Aqif

Jediphase
04-18-2002, 10:20 PM
Hiya

I think i would do this by creating a form that looks like the msg box, then add your buttons your self. then rather then in vb type msgbox, open the form.

When the user clicks the button it does what you want it to do and closes your 'form msgbox'

Other than that im not sure if you can cutomise MSGBOX buttons.

boblarson
04-19-2002, 09:54 AM
The answer Jediphase gives is correct. The message box is not customizable. In order to do so, you need to create your own form and open that instead of a message box when you want it to appear.

You can then make any buttons you want, but there will be no vbInsert or such available. Anything with a vb or ac at the front of it are CONSTANTS that are internal to Visual Basic / Access. So, if it isn't there, you'll have to create your own. However, I'm not sure, but I don't know if it would be good to try to create anything prefaced by vb or ac as the system might tell you that those constants don't exist, or that they conflict. That part is speculation as I've always just avoided trying to do that for safety's sake.

BL
hth