customize MsgBox buttons

ronnroz

Registered User.
Local time
Today, 03:07
Joined
Nov 30, 2004
Messages
15
Hi All,

This is what I'm trying to accomplish.
I have a form, and a user can print a report by pressing a "print button" from that form.
I would like to give them an option when they press the "print" button by using a MsgBox. Instead of using vbYesNo or VbOkCancel I would like the two buttons appearing in the MsgBox to be "Firstname Lastname" and "Lastname, Firstname" so that my users can just click on their box of choice. Based on their selection the appropriate report will print.

I figured out everything else, except the part where I have to customize the MsgBox buttons.

Is that possible or I will have resort to somethign else?

Thank you all for your help.
 
Afraid Not. You will have to design your own form, but you can set the properties of the form, so that it looks like a msgbox.

The only thing that you can manipulate in a msgbox is bolding the text, that was posted on this forum a while again.

Andy
 
You will have to create a form to mimick what you what the message box to do. Set the form to modal. You can customize the form to look as good as you want but it will take some work. But it might be worth it to you.
 
Thanks guys!

I tried creating my own form, trying make it look like a msg box, but it's not the same. For instance, when other reports are maximized, this little dialogue box will become maximized too.

Any other thoughts? I am using Access 97.
Thank you all
 
Try this example.

I can show a form that looks like a msgbox that won't maximise when a report is open.

Just open the Report rptReport.


Hope this helps

Andy
 

Attachments

Last edited:
Thank you SpacePro.

I downloaded the example, and you are right, your msgbox is exactly what I am looking for, unfortunately it's not happening in my case.

I compared the properties of the two forms, they are identical, yet yours doesn't maximize but mine does. What am I doing wrong? I couldn't find any vbcode or macros in your sample database.

What is missing?????
 
Go into Design Mode on frmMsgbox. Press F4 or select Properties.
Click on the Other Tab.

You will see two options :

Popup = Yes
Modal = Yes

There is also a little vba code on the onOpen event of the Report (Press ALT + F11 to view the code) The code is commented.

If you can't figure it out, simply just import the form into your db and change the design. Ideally it would be good for you to understand how this can be done.

Hope this Helps. Good Luck

Andy
 
Just thinking about it, How are you maximising the reports?

Andy
 
Yes yes.. it worked.
Thank you so much Andy.

I missed that Popup thing. Couldn't find any code in onOpen event though.

Thanks.
 
The code is on the Report.

No Problem. Good Luck with your project!

Andy
 

Users who are viewing this thread

Back
Top Bottom