473,322 Members | 1,403 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.

2 comboboxes

I want to select text from combobox 1 and have another combox with a list of
different items. Example:

if cb1 is Dell than show me only the laptop for dell on cb2
if cb1 is IBM than show me only the laptop for IBM on cb2

Jul 31 '08 #1
3 1148
On Jul 31, 1:04*pm, freddy <fre...@discussions.microsoft.comwrote:
I want to select text from combobox 1 and have another combox with a listof
different items. Example:

if cb1 is Dell than show me only the laptop for dell on cb2
if cb1 is IBM than show me only the laptop for IBM on cb2
and your question is?

simply handle the selectedIndexChange in cb1 and then repopulate cb2
Jul 31 '08 #2
What do you mean?

This?

cb2.Items.Clear();
if (cb1.Text == "Dell")
{
cb2.Items.Add("Dell option 1");
cb2.Items.Add("Dell option 2");
cb2.Items.Add("Dell option 3");
} else if (cb1.Text == "IBM")
{
cb2.Items.Add("IBM option 1");
cb2.Items.Add("IBM option 2");
cb2.Items.Add("IBM option 3");
}

"freddy" wrote:
I want to select text from combobox 1 and have another combox with a list of
different items. Example:

if cb1 is Dell than show me only the laptop for dell on cb2
if cb1 is IBM than show me only the laptop for IBM on cb2
Jul 31 '08 #3
On Jul 31, 3:50*pm, jp2msft <jp2m...@discussions.microsoft.comwrote:
What do you mean?

This?

cb2.Items.Clear();
if (cb1.Text == "Dell")
{
* cb2.Items.Add("Dell option 1");
* cb2.Items.Add("Dell option 2");
* cb2.Items.Add("Dell option 3");} else if (cb1.Text == "IBM")

{
* cb2.Items.Add("IBM option 1");
* cb2.Items.Add("IBM option 2");
* cb2.Items.Add("IBM option 3");

}
"freddy" wrote:
I want to select text from combobox 1 and have another combox with a list of
different items. Example:
if cb1 is Dell than show me only the laptop for dell on cb2
if cb1 is IBM than show me only the laptop for IBM on cb2- Hide quoted text -

- Show quoted text -
That is in the most primitive form yes. If you have them in a table or
a dataset you can do it in a general way.

Jul 31 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Kathy | last post by:
In my custom menu one menu item opens a form to add new Makes to TblMakes and another menu item opens a form to add new Models to TblModels. I have a form that has a combobox for Makes and a...
0
by: johnson_cy | last post by:
I am using Access 2000. My main form has a record source of a table (employeeTbl with key of . It is filtering the record results. My subform and mainform have the link child/link master set...
1
by: Craig G | last post by:
for months we have been dabling round looking at various 3rd party comboboxes that allow the user to type text into the combobox as a search mechanism what we've found is that the likes of...
1
by: Marcin Podle¶ny | last post by:
Hi, I've a form with three comboboxes. Each of them contains the same data - all cities in my country. As you see it's a lot of data so it takes a lot of memory. I'd like to use the same...
6
by: Sam | last post by:
Hi, I have a datagrid which has (amongst other stuff) 2 comboboxes columns. So far so good. The trick is that when I select a value in my first column, it must updates the items of the combobox in...
2
by: ashishtarlekar | last post by:
Hi all, I have to add comboboxes in the first row of datagridview for mapping the database fields. For e.g. I have to show Id, FirstName, LastName in each comboboxes in the first row. if i select...
2
by: Matt | last post by:
Hi all, me again! :) I've now got an issue with combo boxes. Basically, I have a number of items that I want a user to pick from a single list. It's basically along the lines of: Fruit 1: ...
3
by: Randy | last post by:
I have a routine that creates a series of comboboxes, each of which is bound to a common dataview. Everything used to work fine, but now, when I change the value of any of the comboboxes, the...
5
by: Anthony Bollinger | last post by:
I have two tables in a master-detail relationship. When I make a selection in one combobox, how do I have it display the values from a second combobox? Each table has a key and a text value for...
2
by: Wingot | last post by:
Hey, I have a view to a database that I have created for Client Maintenance. It has a number of fields, but the important ones are Medical Condition, Bill To, and Country. I have a couple of...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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....

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.