By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,483 Members | 1,909 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,483 IT Pros & Developers. It's quick & easy.

MessageBox alternative

P: n/a
I want to add a Label or a Text box to a form and change it's text when one
of several Command buttons is clicked.
The MsgBox isn't suitable because it pops up a box that the user must close
befor continuing.
What I want is just some kind of a status box that I can set from any
command button.

The text would be either a concatenated string or a simple fixed string.

The Label or the text box does not have focus when you click the command
buttons so it's text property can't be changed.

Any suggestion would be appreciated.
May 30 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
RICHARD BROMBERG <no*****@att.net> wrote:
: I want to add a Label or a Text box to a form and change it's text when one
: of several Command buttons is clicked.
: The MsgBox isn't suitable because it pops up a box that the user must close
: befor continuing.
: What I want is just some kind of a status box that I can set from any
: command button.

: The text would be either a concatenated string or a simple fixed string.

: The Label or the text box does not have focus when you click the command
: buttons so it's text property can't be changed.

I use both labels and text boxes in just this way. The Value
property of a text box can be changed from an event-handler's
code for a command button, as can the Caption property of a label.

--thelma

: Any suggestion would be appreciated.
May 30 '06 #2

P: n/a
Put a label on your form and set it's Caption property
e.g.
Me.Label1.Caption = "This is a message"

or
Put a text box on your form and set it's Value property
e.g.
Me.Text1.Value = "This is a message"

A label is almost certaimnly the better choice.

--

Terry Kreft
"RICHARD BROMBERG" <no*****@att.net> wrote in message
news:Fp*********************@bgtnsc05-news.ops.worldnet.att.net...
I want to add a Label or a Text box to a form and change it's text when one of several Command buttons is clicked.
The MsgBox isn't suitable because it pops up a box that the user must close befor continuing.
What I want is just some kind of a status box that I can set from any
command button.

The text would be either a concatenated string or a simple fixed string.

The Label or the text box does not have focus when you click the command
buttons so it's text property can't be changed.

Any suggestion would be appreciated.

May 30 '06 #3

P: n/a
Hi!

Surely you should add a Label to the form, say lblInfoText.

Then in the onClick event of each button you could add:

Me!lblInfoText.Caption = Me!btnClickWasClicked.Name

which will give you the name you has given the button.

Or if you want a special text to appear you must give the string in
each event like:

Me!lblInfoText.Caption = "Hi! I was clicked by ....."

Me.Name :-)

May 30 '06 #4

P: n/a
On Tue, 30 May 2006 13:04:37 GMT, "RICHARD BROMBERG" <no*****@att.net>
wrote:

Access uses the Statusbar for such modeless messages. Check out SysCmd
in the help file.

-Tom.

I want to add a Label or a Text box to a form and change it's text when one
of several Command buttons is clicked.
The MsgBox isn't suitable because it pops up a box that the user must close
befor continuing.
What I want is just some kind of a status box that I can set from any
command button.

The text would be either a concatenated string or a simple fixed string.

The Label or the text box does not have focus when you click the command
buttons so it's text property can't be changed.

Any suggestion would be appreciated.


May 31 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.