MsgBox, formating font weight partly in the message body


I would like to change the appareance of the message in a msgbox. This is the string :
strMsg = "You are about to delete the day " & intLN & " of the program." & ChR(13) & ChR(13) & ChR(10) & " Are you sure to delete the day? " & ChR(13) & ChR(10) & " If you click Yes, you won't be able to undo this operation"

How can I put in BOLD only the 1st line which is :"You are about to delete the day " & intLN & " of the program."

Thank you for your help


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

>How can I put in BOLD only the 1st line
Easy to answer:  You can't.
You will need to create a dialogue form that pops up instead.
In access '97 this was possible, like this:

msgbox "You are about to delete the day" & intLN & " of the program.@@Are you sure to delete the day?" & vbnewline & "If you click Yes, you won't be able to undo this operation"

From access 2000 onwards the only way to do this is to create you own dialogue like thenelson says.
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
And, you would have to have differnt labels or textbox controls for the formatting, since you can't format portions of a lable or text control ... you could use a RichTextBox control to do this (since you CAN format portions of the text in one of those).
Try some thing like this,  still works in 2000

If Eval("MsgBox('You have just deleted the current record.@ Click ""OK"" to confirm your delete or ""Cancel"" to undo your deletion.@@',1, 'Test Message Box')") = vbOK Then

         'Do somthing here
End If


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
He Neil, that is a good trick! Using eval makes the dialogue box behave as under '97. It also work with access XP.

I would still go for my own form though, given the flexibility.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Fonts Typography

From novice to tech pro — start learning today.