We help IT Professionals succeed at work.

Whats This Button event

1,430 Views
Last Modified: 2008-04-24
Access 2003 Database - nothing out of the ordinary

I have enabled the 'Whats this button' on the form, so now I have a nice little button next to the close box with a question mark in it. How can I make a msgbox appear when the user clicks on this ? button.
Comment
Watch Question

DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
CERTIFIED EXPERT
Top Expert 2007

Commented:
Show All

WhatsThisButton Property
See AlsoApplies ToExampleSpecificsYou can use the WhatsThisButton property to specify whether a What's This button is added to a form's title bar. Read/write Boolean.

expression.WhatsThisButton
expression    Required. An expression that returns one of the objects in the Applies To list.

Remarks
The WhatsThisButton property uses the following values:

Setting Visual Basic Description
Yes True  A What's This button appears on the title bar.
No False  (Default) A What's This button doesn't appear on the title bar.

You can set the WhatsThisButton property by using the form's property sheet, a macro, or Visual Basic.

This property can be set only in form Design view.

You can't display the What's This button on the title bar of a form unless the MinMaxButtons property is set to None.

Clicking the What's This button on the title bar of a form causes the question-mark mouse pointer to appear. With the question-mark pointer, you can click any control to access its custom Help topic specified by the control's HelpContextID property. If the control doesn't have a custom Help topic, the form's custom Help topic is displayed. If neither the form or the control has a custom Help topic, Microsoft Access Help is displayed.

Example
The following example places a What's This button on the title bar of the "Switchboard" form. The form must be in form Design view, or else a run-time error will occur.

Forms.Item("Switchboard").MinMaxButtons = 0
Forms.Item("Switchboard").WhatsThisButton = True
            

Author

Commented:
Ok... so there isnt actually a way to just make that button display a msgbox when clicked?
CERTIFIED EXPERT
Top Expert 2016

Commented:
that  { ? } button is for help. it will open the help pane.

to have a msgbox to appear in the click of the { ? }, afaik, can not be done with simple VBA codes. this may require modification thru the api codes.
Database Architect / Application Developer
CERTIFIED EXPERT
Top Expert 2007
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Ok... on that note then... can you add custom buttons in the title bar which can do anything u want?
CERTIFIED EXPERT
Top Expert 2016

Commented:
<can you add custom buttons in the title bar which can do anything u want>

NO
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
CERTIFIED EXPERT
Top Expert 2007

Commented:
No ... but you can do this:

See this link:

http://www.jamiessoftware.tk/articles/menubars.html
       
Not sure it that article mentions it, but ... when you are in the Customize mode (dialog) ... if you hold down the Control key, you can drop and drag (ie, copy) menu items from one place to another ... handy for making a new menu that is similar another one.

mx
CERTIFIED EXPERT
Top Expert 2016

Commented:
leta37,
do you really want to pursue using a ? box with a message appearing when click?
you could do this creating your own using label and placing them on the header of the form. Set the border style of the form to None.
in click event of the label show your message box.

Author

Commented:
I have found ways to do it, but im not using a thousand lines of code to make one button popup a msgbox...
CERTIFIED EXPERT
Top Expert 2016

Commented:
who mentioned thousand lines of codes?
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
CERTIFIED EXPERT
Top Expert 2007

Commented:
Note.  The answer to your original Q is basically You Can't .... which is what I first posted  states.

If you want to do a work around, maybe another Q is appropriate ...

mx

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.