Results 1 to 11 of 11
  1. #1
    New Lounger
    Join Date
    Sep 2008
    Location
    Liverpool, Merseyside, United Kingdom
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Text format in MsgBox (2003)

    Is there any way of changing the format of text when using the MsgBox function?

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Text format in MsgBox (2003)

    Not really. In Access 97 you could make the first line bold, but that is not available any more.

    If you want more control, create a popup form, and use that instead of the message box.
    Regards
    John



  3. #3
    New Lounger
    Join Date
    Sep 2008
    Location
    Liverpool, Merseyside, United Kingdom
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Text format in MsgBox (2003)

    Many thanks for the quick response John, I'll do just that!
    Irene

  4. #4
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Text format in MsgBox (2003)

    <post#=35509>post 35509</post#> shows you how to create a formatted message box in A2000 (also applicable to A2003)
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

  5. #5
    New Lounger
    Join Date
    Sep 2008
    Location
    Liverpool, Merseyside, United Kingdom
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Text format in MsgBox (2003)

    Thanks so much Steve, that really is a great bit of code, and so much better than using a pop-up.
    Guarantee I'll be using it to death!
    Sorry for the delay in replying by the way.
    Irene

  6. #6
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Text format in MsgBox (2003)

    Steve,

    Can you explain how/why this works? I can't figure out what string is actually passed to the msgbox function to make it highlight that first paragraph.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  7. #7
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Text format in MsgBox (2003)

    The Access Web - Bugs has this explanation. This is the nearest I've found to an explanation.
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

  8. #8
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Text format in MsgBox (2003)

    Thanks. At least now I understand how they got it to work at all!

    In playing with it, I've figured out that apparently it is a very unique situation that the msgbox is looking for. The message string must have 2 @ symbols, and they must be separated by at least a single character. Use another @ , and everything after it is dropped!

    I wonder what other goodies are in there!
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Text format in MsgBox (2003)

    The Access Web article explains the format used by Access 97 and before:

    Msgbox "Bold Line@Plain Line@Another Plain Line", ...

    There are no hidden other features, as far as I know.

  10. #10
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Text format in MsgBox (2003)

    Well, maybe that's what they want you to think!

    Who knows what goodies lurks in the soul of Access? The Shadow knows!
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  11. #11
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Text format in MsgBox (2003)

    There are definitely hidden features, see for example Run wizards from code. But I don't think MsgBox has more options than the one shown in the article SteveH referred to.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •