Expand Message Box

  • Thread starter Thread starter Bill
  • Start date Start date
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
 
change your code to add
& Me!cboList_1 & " chr(13) " & Me!cboList_2
Put Chr(13) where ever you want the line to break.
 
change your code to add
& Me!cboList_1 & " chr(13) " & Me!cboList_2
Put Chr(13) where ever you want the line to break.
 
change your code to add
& Me!cboList_1 & " chr(13) " & Me!cboList_2
Put Chr(13) where ever you want the line to break.
 
change your code to add
& Me!cboList_1 & " chr(13) " & Me!cboList_2
Put Chr(13) where ever you want the line to break.
 
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.
 
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
 
Back
Top