I have a question for people out there, I need the Combobox to change a
label caption when the user picks a certain thing from the list. How do I
code this. I've tried an If Then statement, but it doesn't seem to work.
Somebody please help! 12 3562
"What the Hell?" <ra**********@g mail.com>'s wild thoughts
were released on Thu, 07 Sep 2006 02:36:19 GMT bearing the
following fruit:
I have a question for people out there, I need the Combobox to change a label caption when the user picks a certain thing from the list. How do I code this. I've tried an If Then statement, but it doesn't seem to work. Somebody please help!
Post the code that doesn't work.
Anyway,
Private Sub Combo1_Click()
Label1.Caption = Combo1.Text
End Sub
Jan Hyde (VB MVP)
--
Man with hole in pocket feel cocky all day.
Sorry I should have been more specific, When the User picks from a list of
provinces, the label changes to a different tax rate. Like when they pick
"AB" then the label says "6%"
"Jan Hyde" <St***********@ REMOVE.ME.uboot .comwrote in message
news:r1******** *************** *********@4ax.c om...
"What the Hell?" <ra**********@g mail.com>'s wild thoughts
were released on Thu, 07 Sep 2006 02:36:19 GMT bearing the
following fruit:
> I have a question for people out there, I need the Combobox to change a label caption when the user picks a certain thing from the list. How do I code this. I've tried an If Then statement, but it doesn't seem to work. Somebody please help!
Post the code that doesn't work.
Anyway,
Private Sub Combo1_Click()
Label1.Caption = Combo1.Text
End Sub
Jan Hyde (VB MVP)
--
Man with hole in pocket feel cocky all day.
sorry, the code that doesnt work is
Private Sub cboProvince_Cli ck()
If cboProvince.Lis t = "AB" then LblTax.Caption = "6%"
End Sub
"Jan Hyde" <St***********@ REMOVE.ME.uboot .comwrote in message
news:r1******** *************** *********@4ax.c om...
"What the Hell?" <ra**********@g mail.com>'s wild thoughts
were released on Thu, 07 Sep 2006 02:36:19 GMT bearing the
following fruit:
> I have a question for people out there, I need the Combobox to change a label caption when the user picks a certain thing from the list. How do I code this. I've tried an If Then statement, but it doesn't seem to work. Somebody please help!
Post the code that doesn't work.
Anyway,
Private Sub Combo1_Click()
Label1.Caption = Combo1.Text
End Sub
Jan Hyde (VB MVP)
--
Man with hole in pocket feel cocky all day.
"What the Hell?" <ra**********@g mail.com>'s wild thoughts
were released on Thu, 07 Sep 2006 13:43:37 GMT bearing the
following fruit:
>sorry, the code that doesnt work is
Private Sub cboProvince_Cli ck()
If cboProvince.Lis t = "AB" then LblTax.Caption = "6%"
If cboProvince.Tex t = "AB" then LblTax.Caption = "6%"
>End Sub "Jan Hyde" <St***********@ REMOVE.ME.uboot .comwrote in message news:r1******* *************** **********@4ax. com...
>"What the Hell?" <ra**********@g mail.com>'s wild thoughts were released on Thu, 07 Sep 2006 02:36:19 GMT bearing the following fruit:
>> I have a question for people out there, I need the Combobox to change a label caption when the user picks a certain thing from the list. How do I code this. I've tried an If Then statement, but it doesn't seem to work. Somebody please help! Post the code that doesn't work.
Anyway,
Private Sub Combo1_Click() Label1.Caption = Combo1.Text End Sub Jan Hyde (VB MVP)
-- Man with hole in pocket feel cocky all day.
Jan Hyde (VB MVP)
--
“He’s making a list of chicken and rice,” (Richard Lederer)
huh, thats the same code that i used, doesn't work
"Jan Hyde" <St***********@ REMOVE.ME.uboot .comwrote in message
news:om******** *************** *********@4ax.c om...
"What the Hell?" <ra**********@g mail.com>'s wild thoughts
were released on Thu, 07 Sep 2006 13:43:37 GMT bearing the
following fruit:
>>sorry, the code that doesnt work is
Private Sub cboProvince_Cli ck() If cboProvince.Lis t = "AB" then LblTax.Caption = "6%"
If cboProvince.Tex t = "AB" then LblTax.Caption = "6%"
>>End Sub "Jan Hyde" <St***********@ REMOVE.ME.uboot .comwrote in message news:r1****** *************** ***********@4ax .com...
>>"What the Hell?" <ra**********@g mail.com>'s wild thoughts were released on Thu, 07 Sep 2006 02:36:19 GMT bearing the following fruit:
I have a question for people out there, I need the Combobox to change a label caption when the user picks a certain thing from the list. How do I code this. I've tried an If Then statement, but it doesn't seem to work. Somebody please help!
Post the code that doesn't work.
Anyway,
Private Sub Combo1_Click() Label1.Caption = Combo1.Text End Sub Jan Hyde (VB MVP)
-- Man with hole in pocket feel cocky all day.
Jan Hyde (VB MVP)
--
"He's making a list of chicken and rice," (Richard Lederer)
Sorry for the top post.. how about..
Private Sub cboProvince_Cli ck()
if cboProvince.Lis t(cboProvince.L istIndex) = "AB" then LblTax.Caption =
"6%"
' ... etc.
End Sub
"What the Hell?" <ra**********@g mail.comwrote in message
news:uN1Mg.37$E 67.17@clgrps13. ..
huh, thats the same code that i used, doesn't work
"Jan Hyde" <St***********@ REMOVE.ME.uboot .comwrote in message
news:om******** *************** *********@4ax.c om...
>"What the Hell?" <ra**********@g mail.com>'s wild thoughts were released on Thu, 07 Sep 2006 13:43:37 GMT bearing the following fruit:
>>>sorry, the code that doesnt work is
Private Sub cboProvince_Cli ck() If cboProvince.Lis t = "AB" then LblTax.Caption = "6%"
If cboProvince.Tex t = "AB" then LblTax.Caption = "6%"
>>>End Sub "Jan Hyde" <St***********@ REMOVE.ME.uboot .comwrote in message news:r1***** *************** ************@4a x.com... "What the Hell?" <ra**********@g mail.com>'s wild thoughts were released on Thu, 07 Sep 2006 02:36:19 GMT bearing the following fruit:
I have a question for people out there, I need the Combobox to change a >label caption when the user picks a certain thing from the list. How do >I >code this. I've tried an If Then statement, but it doesn't seem to >work. >Somebody please help! >
Post the code that doesn't work.
Anyway,
Private Sub Combo1_Click() Label1.Caption = Combo1.Text End Sub Jan Hyde (VB MVP)
-- Man with hole in pocket feel cocky all day.
Jan Hyde (VB MVP)
-- "He's making a list of chicken and rice," (Richard Lederer)
THANX! That helped SOOO much!
"Raoul Watson" <Wa*****@Intell igenCIA.comwrot e in message
news:K22Mg.9251 $ay1.3085@trndn y08...
Sorry for the top post.. how about..
Private Sub cboProvince_Cli ck()
if cboProvince.Lis t(cboProvince.L istIndex) = "AB" then LblTax.Caption
= "6%"
' ... etc.
End Sub
"What the Hell?" <ra**********@g mail.comwrote in message
news:uN1Mg.37$E 67.17@clgrps13. ..
>huh, thats the same code that i used, doesn't work
"Jan Hyde" <St***********@ REMOVE.ME.uboot .comwrote in message news:om******* *************** **********@4ax. com...
>>"What the Hell?" <ra**********@g mail.com>'s wild thoughts were released on Thu, 07 Sep 2006 13:43:37 GMT bearing the following fruit:
sorry, the code that doesnt work is
Private Sub cboProvince_Cli ck() If cboProvince.Lis t = "AB" then LblTax.Caption = "6%"
If cboProvince.Tex t = "AB" then LblTax.Caption = "6%"
End Sub "Jan Hyde" <St***********@ REMOVE.ME.uboot .comwrote in message news:r1**** *************** *************@4 ax.com... "What the Hell?" <ra**********@g mail.com>'s wild thoughts were released on Thu, 07 Sep 2006 02:36:19 GMT bearing the following fruit: > > I have a question for people out there, I need the Combobox to >change a >>label caption when the user picks a certain thing from the list. How >>do I >>code this. I've tried an If Then statement, but it doesn't seem to >>work. >>Somebod y please help! >> > Post the code that doesn't work. > Anyway, > Private Sub Combo1_Click() Label1.Caption = Combo1.Text End Sub > > > Jan Hyde (VB MVP) > -- Man with hole in pocket feel cocky all day. > Jan Hyde (VB MVP)
-- "He's making a list of chicken and rice," (Richard Lederer)
"What the Hell?" <ra**********@g mail.com>'s wild thoughts
were released on Thu, 07 Sep 2006 23:18:50 GMT bearing the
following fruit:
>huh, thats the same code that i used, doesn't work
Then why isn't that the code you posted?
It's important you post your actual code.
J
>"Jan Hyde" <St***********@ REMOVE.ME.uboot .comwrote in message news:om******* *************** **********@4ax. com...
>"What the Hell?" <ra**********@g mail.com>'s wild thoughts were released on Thu, 07 Sep 2006 13:43:37 GMT bearing the following fruit:
>>>sorry, the code that doesnt work is
Private Sub cboProvince_Cli ck() If cboProvince.Lis t = "AB" then LblTax.Caption = "6%"
If cboProvince.Tex t = "AB" then LblTax.Caption = "6%"
>>>End Sub "Jan Hyde" <St***********@ REMOVE.ME.uboot .comwrote in message news:r1***** *************** ************@4a x.com... "What the Hell?" <ra**********@g mail.com>'s wild thoughts were released on Thu, 07 Sep 2006 02:36:19 GMT bearing the following fruit:
I have a question for people out there, I need the Combobox to change a >label caption when the user picks a certain thing from the list. How do >I >code this. I've tried an If Then statement, but it doesn't seem to work. >Somebody please help! >
Post the code that doesn't work.
Anyway,
Private Sub Combo1_Click() Label1.Caption = Combo1.Text End Sub Jan Hyde (VB MVP)
-- Man with hole in pocket feel cocky all day.
Jan Hyde (VB MVP)
-- "He's making a list of chicken and rice," (Richard Lederer)
Jan Hyde (VB MVP)
--
The poet had written better poems, but he'd also written verse.
look who cares, the problem is solved now, if you read the last 2 posts, so
why even bother posting that reply
"Jan Hyde" <St***********@ REMOVE.ME.uboot .comwrote in message
news:m4******** *************** *********@4ax.c om...
"What the Hell?" <ra**********@g mail.com>'s wild thoughts
were released on Thu, 07 Sep 2006 23:18:50 GMT bearing the
following fruit:
>>huh, thats the same code that i used, doesn't work
Then why isn't that the code you posted?
It's important you post your actual code.
J
>>"Jan Hyde" <St***********@ REMOVE.ME.uboot .comwrote in message news:om****** *************** ***********@4ax .com...
>>"What the Hell?" <ra**********@g mail.com>'s wild thoughts were released on Thu, 07 Sep 2006 13:43:37 GMT bearing the following fruit:
sorry, the code that doesnt work is
Private Sub cboProvince_Cli ck() If cboProvince.Lis t = "AB" then LblTax.Caption = "6%"
If cboProvince.Tex t = "AB" then LblTax.Caption = "6%"
End Sub "Jan Hyde" <St***********@ REMOVE.ME.uboot .comwrote in message news:r1**** *************** *************@4 ax.com... "What the Hell?" <ra**********@g mail.com>'s wild thoughts were released on Thu, 07 Sep 2006 02:36:19 GMT bearing the following fruit: > > I have a question for people out there, I need the Combobox to >change >a >>label caption when the user picks a certain thing from the list. How >>do >>I >>code this. I've tried an If Then statement, but it doesn't seem to >>work. >>Somebod y please help! >> > Post the code that doesn't work. > Anyway, > Private Sub Combo1_Click() Label1.Caption = Combo1.Text End Sub > > > Jan Hyde (VB MVP) > -- Man with hole in pocket feel cocky all day. > Jan Hyde (VB MVP)
-- "He's making a list of chicken and rice," (Richard Lederer)
Jan Hyde (VB MVP)
--
The poet had written better poems, but he'd also written verse. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Piet |
last post by:
Hello wxPythoneers.
I have a problem with a dialog box derived from wxFrame which has a
wxComboBox as main element. Depending on the entry selected from the
ComboBox, the dialog box will be populated with a number of controls.
This works fine for the first selection of a combobox item, but
subsequent selections from the combobox cause problems. This is
because the event function for the combobox populates the sizer for
the window with...
|
by: Marcin Borkowski |
last post by:
Hello
I need some small help in the Borland C++ Builder.
I need to do something with string in format like "var1|var2|var3|var4|" and
add it to some ComboBox (Items -> Add("var1"), Items -> Add("var2") etc.).
Help me, please. How can i do it in the "while" function or something?
Best regards
Martin
|
by: Andi Plotsky |
last post by:
Hi - I sent this request last week, but didn't get an answer to my problem -
let's try again:
In my A2K database, I have a form with 2 Unbound Comboboxes, both of which
open up forms to a particular record. One of these comboboxes works
perfectly. For some reason the 2nd one WILL NOT autofill. If I enter a
number to lookup by typing it in, it ALWAYS says it's not in the list (Error
2237) - but if I select the item, it works fine. I...
|
by: my-wings |
last post by:
I think I've painted myself into a corner, and I'm hoping someone can help
me out.
I have a table of books (tblBooks), which includes a field (strPubName) for
Publisher Name and another field (strPubCity) for Publisher City. These two
fields have a many-to-one relationship with tables, (tlkpPubName and
tlkpPubCity) respectively. The lookup tables only have one field (strPubName
and strPubCity), which is their primary key.
I also have...
|
by: Jax |
last post by:
I am using a class that inherits from the
DataGridTextBoxColumn.
It adds a combo box into the column where it displays a
selection of choices.
The problem I have is that when this comboBox loses focus
I lose the selected text.
And this next line isn't setting the text in the cell.
// code within the custom DataGridComboBoxColumn class
this.TextBox.Text = this.ComboBox.SelectedItem.ToString();
| |
by: anonymous |
last post by:
I've been trying to put a them, please help me out.
Here's the major parts of my code:
public Form1()
{
DataSet myDataSet = new DataSet("myDataSet");
DataTable testTable = new DataTable("table");
testTable.Columns.Add("Col1", typeof(Int32));
testTable.Columns.Add("Col2", typeof(String));
testTable.Rows.Add(testTable.NewRow());
|
by: Hazz |
last post by:
In this sample code of ownerdraw drawmode, why does the '(ComboBox) sender'
line of code need to be there in this event handler?
Isn't cboFont passed via the managed heap, not the stack, into this
cboFont_DrawItem event handler? Why does it need to be cast? -hazz
,.................
cboFont.Items.AddRange(FontFamily.Families);
}
private void cboFont_DrawItem(object sender,
|
by: jon f kaminsky |
last post by:
Hi-
I've seen this problem discussed a jillion times but I cannot seem to
implement any advice that makes it work. I am porting a large project from
VB6 to .NET. The issue is using the combo box bound to a table as a lookup,
drawing values from another table to populate the available selections. This
all worked fine in VB6.
I have distilled the problem down to a simple form drawing data from the
Northwind database for a representative...
|
by: Rick Shaw |
last post by:
Hi. I am very new to C# and needed help. Use to program in Delphi but
switching to C#. I am just starting my very first application and already
don't know what to do. Here is what I'm trying to do.
I have 2 comboboxes. 1st combobox is filled (dataset binding) with list of
companies from the form load. The 2nd combobox, contain list (filled from
dataset then bind) of employees where each employee belongs to a specific
company. So,...
|
by: active |
last post by:
I need a combobox where the items are typed as string - not object.
And another where the items are from a class I generated.
Can one make such comboboxes from System.Windows.Forms.ComboBox?
If that is not practical I appreciate you telling me that?
Thanks in advance
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |