Define Button Text

G

Greg

How can I control the text that shows up on a button from
vb code? I am setting up a message box and do not want to
use vbYesNo for the button text. I want to have two
choices, Query or Report.

Thanks
 
P

prabha

Hi Greg,

You will need to create your own Msgbox. Can't change the buttons they are
apart of VBA.

Here's how you can create one in Access:

- Create a Form that has the buttons you need

- Put whatever code you need behind the buttons

- Set the Form Properties "PopUp" and "Modal" equal to Yes

I hope this helps! If you have additional questions on this topic, please
respond back to this posting.


Regards,

Eric Butts
Microsoft Access Support

"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <http://windowsupdate.microsoft.com/> to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."


--------------------
| Content-Class: urn:content-classes:message
| From: "Greg" <[email protected]>
| Sender: "Greg" <[email protected]>
| Subject: Define Button Text
| Date: Wed, 18 Feb 2004 11:57:12 -0800
| Lines: 6
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcP2WWaRfJAnVbx1T5G1ia3t+pGVoA==
| Newsgroups: microsoft.public.access.setupconfig
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.access.setupconfig:29118
| NNTP-Posting-Host: tk2msftngxa11.phx.gbl 10.40.1.163
| X-Tomcat-NG: microsoft.public.access.setupconfig
|
| How can I control the text that shows up on a button from
| vb code? I am setting up a message box and do not want to
| use vbYesNo for the button text. I want to have two
| choices, Query or Report.
|
| Thanks
|
 
G

Guest

Okm that works. Thanks for the assist!
-----Original Message-----
Hi Greg,

You will need to create your own Msgbox. Can't change the buttons they are
apart of VBA.

Here's how you can create one in Access:

- Create a Form that has the buttons you need

- Put whatever code you need behind the buttons

- Set the Form Properties "PopUp" and "Modal" equal to Yes

I hope this helps! If you have additional questions on this topic, please
respond back to this posting.


Regards,

Eric Butts
Microsoft Access Support

"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<http://www.microsoft.com/security/security_bulletins/ms03 -026.asp> and/or
to visit Windows Update at
 
L

lj

Graham,

I used the code for the FMsgBox(); I pasted it into the small Utilities
module attached to my current project. Imagine my surprise when
Debug|Compile resulted in an error: Type not defined...

First thought was "What? How can that be?" Then I looked at the code. At the
beginning of the function, Optional Title as String is declared; but the
actual code calls for sTitle.

Then I smiled. Actually grinned. And thought that even if that was a typo,
maybe you should leave it because it accomplished four things:

Made me glad to have followed advice to have Option Explicit turned on
Made me glad to have followed advice to compile frequently
Reinforced the idea that we should use our brains a little, not just cut and
paste
Provided a tiny boost to the non-existent ego of a neophyte trying to use a
very powerful program-- (See, you CAN figure out a problem and solve it...)

Thanks for the code; it did just exactly what I've been trying to figure out
how to do! And thanks for all the help that you MVPs provide for those of us
trying to learn how to use Access effectively.

lj
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top