Access XP: Msgbox Line Break

Is there an easy way to break a message into separate lines? In Access 97, I used this... but it didn't translate to XP.

msgbox "You selected a Warehouse number.@*This is only for Projects that will be stored at either the DMC or the MacAdams Group, LLC. DMC items require a unique 6 Digit eShip number.@"
LVL 3
tokerblueAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

jadedataMS Access Systems CreatorCommented:
Hey tokerblue!

I use:  
  "String" & vbcrlf & "Value" & vbcrlf & "LINE BREAKS"

vbcrlf is the builtin constant for Chr(13) & chr(10)

regards
Jack

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
tokerblueAuthor Commented:
Jack,

I'm not very good when it comes to this. Can you show me how it would break in code?

For example:
Line 1 here
Line 2 here
stevbeCommented:
points still go to Jack ...

"Line 1 Here" & vbCrLf & "Line 2 Here"
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

jadedataMS Access Systems CreatorCommented:
Press {CTRL}{G}
in the immediate window type
?"String" & vbcrlf & "Value" & vbcrlf & "LINE BREAKS"
press return/enter

then type
?"Line 1 Here" & vbcrlf & "Line 2 Here"
press return/enter

same, same, only the strings have changed to protect the innocent.
tokerblueAuthor Commented:
One more quick question. Is there a way to make the first line bold?
stevbeCommented:
nope ... you would need to make your own form to do that.

steve
tokerblueAuthor Commented:
No big deal. It was a question more for curiosity's sake. In Access 97, it automatically made the first line bold and the rest of the lines in normal type.

Much thanks for your quick help.
jadedataMS Access Systems CreatorCommented:
tokerblue:  

Will it be your policy on future questions to get the answer to your question and then ask another and award to the second answer???  

Just curious.  If so I can save my time by bypassing your questions in favor of answering questions on other threads.
stevbeCommented:
jack ... please see the post coming soon to your neighborhood ... I feel partly responsible for jumping into a question you had well in hand

steve
tokerblueAuthor Commented:
jadedata, this was my fault. I just realized that I awarded the points to stevbe by accident. I meant to award them to you. I'll correct this.
jadedataMS Access Systems CreatorCommented:
I would consider a Split with Steve to be most appropriate as he always has excellent input to provide.
I thank you for reconsidering this matter.  Some questioners would just blow it off.  You are a gentleman (i think) and a scholar.
jadedataMS Access Systems CreatorCommented:
and I always like working with Steve on questions anyways.
tokerblueAuthor Commented:
What really sucks is that I've been on this board for a long time and should have noticed. I think the biggest problem is that this is the second day I'm seeing this new format for the board. :)
jadedataMS Access Systems CreatorCommented:
It took everyone a while to get used to.
Again, thank you for you re-consideration on this, please split with Steve.
gwgawCommented:
Actually, you can make the first line bold. Try this.

Private Sub Command0_Click()
Dim stMsg As String
Dim lgRet As Long
stMsg = "First line in bold.@But not this line." & vbCrLf & "And this line.@"
lgRet = FormatMsgBox(stMsg, vbInformation, "Microsoft Access")
End Sub

Public Function FormatMsgBox(Prompt As String, Buttons As VbMsgBoxStyle, Title As String) As VbMsgBoxResult
Dim stMsg As String
stMsg = "MsgBox(""" & Prompt & """, " & Buttons & ", """ & Title & """)"
FormatMsgBox = Eval(stMsg)
End Function

gaw
jadedataMS Access Systems CreatorCommented:
tokerblue: Thanx for the question.
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
Microsoft Access

From novice to tech pro — start learning today.