Quick Find: Search for:
Free Resources
from FMS
 

Demos

Email Newsletter

Technical Papers

Tips and Techniques

Links

Book Recommendations

View all FMS products for Microsoft AccessMicrosoft Access Resource Center

 

 

"Thank you! Thank you!
I just finished reading this
document, which was part of a link in the recent Buzz newsletter. I have printed it for others to read, especially those skeptical on the powers of Access and its capabilities.
" 
- Darren D.
 
  

 

The behavior of the Application Title and the Msgbox() function in Microsoft Access

Provided by: FMS Development Team

The Msgbox() function has an optional parameter, "Title", that allows you define the caption of the message box. However, if the Title is omitted, then Microsoft applies a default value.

Access Version VBA Displays Macro Displays
97, 2000, 2002 Microsoft Access Microsoft Access
2003 Microsoft Office Access Microsoft Office Access

In Access 97, if you specify an Application Title under the Tools->Startup menu, then this value will appear in the caption of the Msgbox() function if there is no value specified for the "Title" parameter. This is a nice feature because it allows a centralized location to apply the title to all Msgbox() functions throughout the application. However, starting with Access 2000 and through Access 2003 (current version), this functionality was changed. Even if you specify the Application Title, this will not be displayed if the "Title" parameter is missing from the Msgbox() function.

This is important to know if you should be converting an Access 97 application to a newer version of Access. So, the question now is, where do we go from here?

  1. Continue to use the Application Title under the Tools->Startup menu.

  2. Create a global function to retrieve the Application Title from the application.

  3. Create several customized, global Msgbox() functions to be called in your application.

  4. Create a global constant to hold a default value for the Title parameter, in such an event that the Application Title was not specified (Its ok to be forgetful).

Here is a working example to illustrate the new concepts to apply.

Sample Code  

Return to the tips page.

Questions  l   Web questions: Webmaster   l   Copyright © 2008 FMS, Inc.

Celebrating 21 Years of Software Excellence