I wanted to create a formatted message box in Access, with the first line being bold, to duplicate the built-in delete confirmation message. In older versions of Access, you could use
MsgBox "First line is bold@Second line is normal@@"
but when Access moved from 97 to 2000 this feature went away.
I Google'd this & found several versions of a workaround, and here is what worked for me in Access 2003:
EDIT: 06/19/2008 this replaces the original code:
Function MsgBoxEx(sBoldText As String, sNormalText As String, iButtons As Integer, iIcon As Integer, sTitle As String) As Integer
Dim s As String
s = sBoldText & "@"
s = s & sNormalText & "@@"
MsgBoxEx = Eval("MsgBox(""" & s & """, " & iButtons + iIcon & ", '" & sTitle & "')")
This function will accept built-in constants for buttons and icons, and will return a value based on the buttons.