473,322 Members | 1,347 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

MessageBox alternative

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
4 4932
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Bhavna | last post by:
Hi I am using a messabge box to show a message containing varibles and values from controls the problem i have is that the values for variable1 and combobox1.selectedvalue do not seem to show...
11
by: Rich Tasker | last post by:
I have a strange situation. A simple call to MessageBox.Show("XXX", "YYY") does not display the message in the messagebox with a visible font. Based on the content of the messagebox, the box...
0
by: Patrick De Ridder | last post by:
Below an example from "Windows Forms Programming with C#", by Erik Brown (Manning) p. 228. According to me the example is wrong. The message box does not get activated when an erroneous file name...
2
by: Dennis C. Drumm | last post by:
This is a restatement of an earlier post that evidently wasn't clear. I am building a custom MessageBox dialog that has, among other things, a few new button options (yes to all, no to all, etc.)...
8
by: Saso Zagoranski | last post by:
Hi! I'm trying to make my own MessageBox... What I would like to know is, how the MessageBox class is implemented? I could have something like: new MyMessageBox().ShowDialog(); but I would...
4
by: Tressa | last post by:
I have a messagebox that I only want to pop up only if it is not already being displayed on the screen. My code is still poping up the messagebox even though it is on the screen. What am I doing...
0
by: alex_f_il | last post by:
The class centers MessageBox inside the parent rectangle. Enjoy! using System; using System.Windows.Forms; using System.Text; using System.Drawing; using System.Runtime.InteropServices; ...
20
by: Peter E. Granger | last post by:
I'm having a strange problem (or at least it seems strange to me) trying to display a MessageBox in a VC++ .NET forms application. If I put the call to MessageBox::Show in the form's .h file, it...
7
by: Stanley | last post by:
Hi everyone! Is it possible to show up a messagebox with timeout, so that it will auto select default button within certain time! Everyone please help!! Thanks Regards, Stanley
10
by: pcnerd | last post by:
I've created a demo program that draws random lines on the form. At the end, a messagebox pops up with the words"I'm done!". When I click on "OK", the messagebox disappears, but a white square is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.