Text in Title bar of msgbox

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

When I create a msgbox can I have my own title instead of it saying
Microsoft Access?

Also - anyway of sizing it?

Thanks In Advance

Dave
 
Too easy:
MsgBox "Say what?",,"Put your title here"

You can't control the size of the message box. You can include a CrLf
(carriage return + line feed) in the text to break it into shorter lines.
 
Hi Dave,



Dave said:
When I create a msgbox can I have my own title instead of it saying
Microsoft Access?

The third argument in MsgBox() provides the place for a window title:

If MsgBox("Click the ok button if you love cheese!", vbOkOnly, "Your title
here") = ok Then
blah blah blah
Also - anyway of sizing it?

I'm pretty sure that if you want to size it you may have to just create and
use a separate form instead of using the built-in msgbox function.

HTH,
CW
 
Thank you again Mr Allen Browne

Allen Browne said:
Too easy:
MsgBox "Say what?",,"Put your title here"

You can't control the size of the message box. You can include a CrLf
(carriage return + line feed) in the text to break it into shorter lines.
 
Thanks CW

what is the second argument? I have is blank you have "vbOkOnly"
Can you explain.

And yep a new form instead of a msgbox would be satisfactort but I am
finding that "resizing" was not as important as I first thought.

Thanks again

dave
 
Hi Dave,

The second argument is for the buttons you want to show up on the message
box. You should, as suggested, look it up, though. That way you'll be
familiar with all the arguments. It's a pretty commonly used function.

CW
 
And the reason yours works with a blank in the second argument is that
"vbOkOnly" is the default for this argument.
 
OK - now I want to take it one step further and add a second potential
search field:
But this did not work - and this time I don't thik it is a quote error
stLinkCriteria = "[phone_1]= '" & txtSearchPhones & "'" & " Or [phone_2]='"
& txtSearchPhones & "'" & " Or [phone_3]='" & txtSearchPhones & " Or
[last_name]='" & txtSearchLastName & "'"

what have I done wrong?

Thanks again
dave
 
Disregard my last post - it was in the wrong place.

maybe some sleep is needed???

dave

Dave said:
OK - now I want to take it one step further and add a second potential
search field:
But this did not work - and this time I don't thik it is a quote error
stLinkCriteria = "[phone_1]= '" & txtSearchPhones & "'" & " Or
[phone_2]='" & txtSearchPhones & "'" & " Or [phone_3]='" & txtSearchPhones
& " Or [last_name]='" & txtSearchLastName & "'"

what have I done wrong?

Thanks again
dave

Dave said:
When I create a msgbox can I have my own title instead of it saying
Microsoft Access?

Also - anyway of sizing it?

Thanks In Advance

Dave
 
Back
Top