Results 1 to 7 of 7
  1. #1
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Moundridge, Kansas, USA
    Posts
    342
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Red lettering in MsgBox (Access 2003 SP3)

    Is there anyway to make the font color red in a message box?

    Is there any way to make 2 spaces between sentences like these 2 sentences?

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

    Re: Red lettering in MsgBox (Access 2003 SP3)

    1) Not with a standard message box. You could create a small form in Access to simulate a message box, and format it the way you like.

    2) Yes: you can insert line breaks in a message box using vbCrLf:

    MsgBox "First line" & vbCrLf & vbCrLf & "Second line"

  3. #3
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Moundridge, Kansas, USA
    Posts
    342
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Red lettering in MsgBox (Access 2003 SP3)

    OK. So this form, can it be used for all message boxes or do you have to make a form for every message box you want to use?

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

    Re: Red lettering in MsgBox (Access 2003 SP3)

    You can make the message variable. See the attached simplistic demo. You can specify the (multiline) message text, its color, the button text and the window title.

    The demo could be expanded by adding more buttons etc.
    Attached Files Attached Files

  5. #5
    5 Star Lounger st3333ve's Avatar
    Join Date
    May 2003
    Location
    Los Angeles, California, USA
    Posts
    705
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Red lettering in MsgBox (Access 2003 SP3)

    I downloaded, extracted and tried to open the database, but Access 2002 won't let me. It says, "This file is located outside your intranet or on an untrusted site. ... To open the file, copy it to your machine or an accessible network location."

    I have the same problem even if I copy your .mdb file to the same folder (on my C: drive) as my other front-end .mdb files.

    I'm guessing maybe the "file" it's talking about isn't the database itself. Does the database try to open some other file with a "dangerous" path? Or does one of my security settings need to be tweaked?

  6. #6
    5 Star Lounger st3333ve's Avatar
    Join Date
    May 2003
    Location
    Los Angeles, California, USA
    Posts
    705
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Red lettering in MsgBox (Access 2003 SP3)

    A follow-up to my previous post. I right-clicked on the file, selected Properties and then hit the Unblock button. It still wouldn't open the first time I tried. But then I closed Access and tried again and it opened.

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

    Re: Red lettering in MsgBox (Access 2003 SP3)

    The database doesn't do anything special, but your Windows doesn't trust it because it came from outside.
    Right-click the database (.mdb)
    Select Properties from the popup menu.
    Click the Unblock button near the bottom of the dialog.
    Click OK.
    You should now be able to open the database.

Posting Permissions

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