English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I want to insert a field of a table to a "combo"box.
i want to see all of them in combo "box" synchronic.
please write me an example code .
thank you very much.

2006-08-08 10:32:11 · 2 answers · asked by Hossein 1 in Computers & Internet Programming & Design

2 answers

You would use a query to get the field from the table like
adoRS = New adodb.Recordset
With adoRS
.ActiveConnection = adoCon
.LookType = adReadOnly
.open Select FieldForCombo from


If .recordCount > 0 then
.MoveLast
.MoveFirst
Do while Not .EOF
MyComboBox.Item.Add adoRS(FieldForCombo
.MoveNext
Loop
End if
.Close
End with
Set adoRS = Nothing

Helmut

2006-08-08 11:19:48 · answer #1 · answered by hswes 2 · 0 0

Samples
1- http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=50349&lngWId=1

2-http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=9581&lngWId=1

2006-08-08 19:01:27 · answer #2 · answered by Tanveer Ahmed 3 · 0 0

fedest.com, questions and answers