472,975 Members | 1,396 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,975 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 1135
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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.