Select the product you need help with
- Internet Explorer
- Windows Phone
- More products
ACC2000: MsgBox Function Ignores At Sign (@) Formatting
Article ID: 242889 - View products that this article applies to.
This article was previously published under Q242889
Moderate: Requires basic macro, coding, and interoperability skills.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
In Microsoft Access 2000, the at sign (@) does not provide special formatting when you use it with the MsgBox function.
The MsgBox function provided by the Microsoft Visual Basic Editor (Vbe6.dll) does not support the formatting provided by the at sign (@).
There are two possible solutions. One solution is to use the MsgBox action in a macro. The other solution is to write a user-defined function that uses the Eval function to call the MsgBox function.
Creating a Macro that Uses the MsgBox Action
Creating the FormattedMsgBox FunctionThe Eval function forces the Visual Basic for Applications expression service to evaluate the MsgBox function separately from Visual Basic Editor, and therefore it is possible to take advantage of at sign formatting. The following example uses a user-defined function named FormattedMsgBox instead of the MsgBox function. To create the FormattedMsgBox function, follow these steps:
In earlier versions of Microsoft Access, you can use the at sign to format portions of the message text in a MsgBox function. When you use two at signs in the text of the MsgBox function, the text delimited by the at sign is separated into three paragraphs in the Message Box, with the first paragraph in bold text.
This functionality is provided by the Visual Basic for Applications library (Vba332.dll) in Microsoft Access 97. With the integration of the Microsoft Visual Basic Editor, Microsoft Access 2000 no longer implements Vba332.dll.
Steps to Reproduce Behavior
This is an invalid operation.
Refer to online help.