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
- Start Microsoft Access.
- Open the sample database Northwind.mdb.
- Create a new module.
- Add the following code to the module:
Option Compare Database
Option Explicit
Sub FormatMessage()
Dim strMsgText As String
strMsgText = "Extremely Important@This is an invalid operation.@" & _
"Refer to online help."
MsgBox strMsgText
End Sub
- Run this procedure in the Immediate window.
Note that the message contains the literal string "Extremely Important@This is an invalid operation.@Refer to online help." In Microsoft Access 95 and 97, this message is formatted into three separate paragraphs with the text "Extremely Important" in bold, similar to the following:
Extremely Important
This is an invalid operation.
Refer to online help.