is it possible to attach a combo box to an input box ( or maybe a label or textbox) ?
be more precised, i would like to know how to get codes for combo box
thanks for advance
as far as i know cannot attach a combo box to an input box.. what exactly you want to do..give an example...
if you just want to get the data from the combo box...
you can use this code
Text1.Text = Combo1.List(0) 'get the data on the first position
Text1.Text = Combo1.List(1) 'get the data on the second position
cguan_77
Nearly a Posting Virtuoso
1,317 posts since Apr 2007
Reputation Points: 19
Solved Threads: 115
To address controls in another form you need to add the form name...
Form1.Text1.Text
Good Luck
vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 296
let's say you have form1 and form2 and in each form you have a combo box, list box and a text box...
combo1.additem "abc" ' enter data to combo box
list1.additem "abc" ' enter data to list box
get data from form1 and add data to form2 listbox or combo box
Private Sub Command1_Click()
Form2.Combo1.AddItem Text1.Text 'get the data in form1 text1 and add data to form2 combo box1
Form2.List1.AddItem Text1.Text 'get the data in form1 text1 and add data for form2 list box1
End Sub
get data from form2 list box and combo box and add data to form1 list box or combo box
Private Sub Command2_Click()
Text1.Text = Form2.List1.List(1) 'get the data in form2 list box1 and display data on form1 text1
Combo1.AddItem Form2.List1.List(1) 'get the data in form2 list box1 and add data to form1 combo box1
List1.AddItem Form2.Combo1.List(1) 'get the data in form2 combo box1 and add data to form1 list box1
End Sub
cguan_77
Nearly a Posting Virtuoso
1,317 posts since Apr 2007
Reputation Points: 19
Solved Threads: 115