Text in Title bar of msgbox

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
 
A

Allen Browne

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

Cheese_whiz

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
 
D

Dave

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

Dave

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
 
C

Cheese_whiz

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
 
L

Linq Adams via AccessMonster.com

And the reason yours works with a blank in the second argument is that
"vbOkOnly" is the default for this argument.
 
D

Dave

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
 
D

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
 

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