CATDOLL : CATDOLL: How to add database content to a text box based on changes in a combo box in C#

CATDOLL: How to add database content to a text box based on changes in a combo box in C#

1. How to add database content to a text box based on changes in a combo box in C#

When there are two items in your listbox:

textBox1.Text = listBox1.Items[0].ToString();

textBox1.Text += listBox1.Items[1].ToString();

If there are multiple, you can use a loop

I tried this code, it works fine

2. How to assign a value to a combo box in the VBA code editor in Excel? Don't use the value of a specified cell. What I need is to assign a value to a combo box in Excel.

Use additem in the workbook_open event. If your combo box is in a form, replace sheet1 with userform1:

Private Sub Workbook_Open()

Sheet1.ComboBox1.AddItem (1)

Sheet1.ComboBox1.AddItem (2)

Sheet1.ComboBox1.AddItem (3)

Sheet1.ComboBox1.AddItem (4)

End Sub

3. How to read multiple data in Easy Language combo box

.Version 2 .Assembly windowAssembly 1 .Subroutine __Startup window_ is created.Local variable a, integer type.Local variable item value, integer type.Local variable item text, text type.Local variable item value to be found, integer type item value to be found = 8 .Counting loop start (combo box 1.Get item number(), a) Item value = combo box 1.Get item value (a - 1) .If true (item value = item value to be found) Item text = combo box 1.Get item text (a - 1) combo box 1.Select (item text) .If true end.Counting loop end ()

IV. About the combo box design problem in VB

Use an array or query database to find all the colleges and universities in the province. Then clear the contents of the second combo box. Then add the colleges and universities one by one.

This type of programming is best associated with a database. When the first combo box changes the selection, query the database to change the content of the second combo box.

Access can. You set up two fields, one for the province name and one for the school name. Put the data you want in there.

In addition, there is also knowledge about VB connecting and accessing databases and knowledge about SQL querying databases. If you don't know either of these, it's best to look up relevant information on the Internet.

<<:  CATDOLL:How to grow cicadas?

>>:  CATDOLL: What are the effects of a hornet's nest? Can it be done by just soaking it in white wine?

Recommend

CATDOLL: How do snails reproduce?

How do snails reproduce? 1. Selection of parent s...

Which one is better, cat grass or hair removal cream? How to choose?

Cat grass and hair remover have different advanta...

CATDOLL: What to do if roses are covered with tiny insects

What to do if roses are covered with small insect...

CATDOLL: How to scientifically formulate feed for pigs

introduction Feed formula for feed pigs is an imp...

CATDOLL: Does sea bream sashimi have parasites? Is sea bream a tilapia?

1. Does sea bream sashimi have parasites? Is sea ...

CATDOLL: The water temperature is suitable for feeding dried fish to turtles

1. The water temperature is suitable for feeding ...

CATDOLL: How many types of catfish are there?

answer Common catfish are generally divided into ...

CATDOLL: Chitin and chitosan can be extracted from the skin of fly maggots

Chitin and chitosan can be extracted from the ski...

CATDOLL: How to breed guppies How to breed guppies

1. Guppies need to be fed regularly. Small fish s...

CATDOLL: Are silver carp and bighead carp in the same water layer?

Abstract: [Are silver carp and bighead carp in th...

CATDOLL: How to treat yellow catfish red head disease

How to treat yellow catfish red head disease The ...