Solved

Access XP: Msgbox Line Break

Posted on 2003-10-24
17
1,080 Views
Last Modified: 2008-07-05
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.@"
0
Comment
Question by:tokerblue
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
  • 3
  • +1
17 Comments
 
LVL 32

Accepted Solution

by:
jadedata earned 25 total points
ID: 9615010
Hey tokerblue!

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

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

regards
Jack
0
 
LVL 3

Author Comment

by:tokerblue
ID: 9615096
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
0
 
LVL 39

Expert Comment

by:stevbe
ID: 9615117
points still go to Jack ...

"Line 1 Here" & vbCrLf & "Line 2 Here"
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 32

Expert Comment

by:jadedata
ID: 9615136
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.
0
 
LVL 3

Author Comment

by:tokerblue
ID: 9615186
One more quick question. Is there a way to make the first line bold?
0
 
LVL 39

Expert Comment

by:stevbe
ID: 9615218
nope ... you would need to make your own form to do that.

steve
0
 
LVL 3

Author Comment

by:tokerblue
ID: 9615240
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.
0
 
LVL 32

Expert Comment

by:jadedata
ID: 9615272
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.
0
 
LVL 39

Expert Comment

by:stevbe
ID: 9615362
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
0
 
LVL 3

Author Comment

by:tokerblue
ID: 9616898
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.
0
 
LVL 32

Expert Comment

by:jadedata
ID: 9617021
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.
0
 
LVL 32

Expert Comment

by:jadedata
ID: 9617029
and I always like working with Steve on questions anyways.
0
 
LVL 3

Author Comment

by:tokerblue
ID: 9617055
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. :)
0
 
LVL 32

Expert Comment

by:jadedata
ID: 9617071
It took everyone a while to get used to.
Again, thank you for you re-consideration on this, please split with Steve.
0
 
LVL 5

Expert Comment

by:gwgaw
ID: 9619032
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
0
 
LVL 32

Expert Comment

by:jadedata
ID: 9651879
tokerblue: Thanx for the question.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question