Expand Message Box

B

Bill

Hi

When I create a message box but i got two rows instead of four rows. Is
there a way to have four rows on the message box. I don't know if I did
wrong.

Your help would be much appreciated.

If ..............Then
strMsg = " ..............."
strMsg = strMsg & "@............."
strMsg = strMsg & "@" & Me!cboList_1 & " ........" & Me!cboList_2
strMsg = strMsg & "@Click Yes to continue or No to cancel."
End If

If MsgBox(strMsg, vbQuestion + vbYesNo, " ") = vbYes Then
'do nothing
Else
'DoCmd.RunCommand acCmdUndo
Me.Undo
Exit Sub
End If
 
F

Frank Stone

change your code to add
& Me!cboList_1 & " chr(13) " & Me!cboList_2
Put Chr(13) where ever you want the line to break.
 
F

Frank Stone

change your code to add
& Me!cboList_1 & " chr(13) " & Me!cboList_2
Put Chr(13) where ever you want the line to break.
 
F

Frank Stone

change your code to add
& Me!cboList_1 & " chr(13) " & Me!cboList_2
Put Chr(13) where ever you want the line to break.
 
F

Frank Stone

change your code to add
& Me!cboList_1 & " chr(13) " & Me!cboList_2
Put Chr(13) where ever you want the line to break.
 
M

Marshall Barton

Bill said:
When I create a message box but i got two rows instead of four rows. Is
there a way to have four rows on the message box. I don't know if I did
wrong.

Your help would be much appreciated.

If ..............Then
strMsg = " ..............."
strMsg = strMsg & "@............."
strMsg = strMsg & "@" & Me!cboList_1 & " ........" & Me!cboList_2
strMsg = strMsg & "@Click Yes to continue or No to cancel."
End If

If MsgBox(strMsg, vbQuestion + vbYesNo, " ") = vbYes Then
[]


You need to use Chr(13) & Chr(10) to get a new line in
Access. In VBA code, you can use the built in constant
vbNewLine (or vbCrLf).

strMsg = " ..............." & vbNewLine _
& "............." & vbNewLine _
& Me!cboList_1 & " ........" & Me!cboList_2 & vbNewLine _
& "Click Yes to continue or No to cancel."

Note that the MsgBox @ feature went away in A2K, so you
should save yourself some future conversion effort by
avoiding its use.
 
M

Mingqing Cheng [MSFT]

Hi Bill,

I wanted to post a quick note to see if you would like additional
assistance or information regarding this particular issue. We appreciate
your patience and look forward to hearing from you!

Thank you for your patience and cooperation.


Sincerely yours,

Mingqing Cheng
Microsoft Developer Community Support
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top