|
-
Jun 14th, 2007, 11:28 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] store variable from combo box list
I have two form, FORM 1 and FORM 2.
I have combo box with list item, All in form1
0 - "A"
1 - "B
When I choose "A" from combo box in FORM1 , How I can show the selected list(Variable) to be display in textbox on form 2 ?
Code:
Combo1.ListIndex = 0
Combo1.Text = Combo1.List(Combo1.ListIndex)
-
Jun 14th, 2007, 11:32 AM
#2
Addicted Member
Re: store variable from combo box list
Assuming the textbox on your second form is called Text1
vb Code:
Form2.Text1.Text = Combo1.List(Combo1.ListIndex)
That would be the quickest way. You can also setup a Sub to change it as well.
- If you found my post to be helpful, please rate me.

-
Jun 14th, 2007, 12:01 PM
#3
Thread Starter
Frenzied Member
Re: store variable from combo box list
From Form 1 to From 2, It show the List in the textbox on form2. Then Form 2 to Form 3 and back again to Form2, How I can retain the List show in textbox in Form2 ? It seem, the list clear in Form 2. The flow like that
Code:
Form1 -- > Form2 -- Form 3 -- > Form 2 again.
OK 'Text1 = clear'. Why?
'I put the code in Form1
form2.Text1.Text = Combo1.List(Combo1.ListIndex)
'What code I need to put in Form 3 ?
-
Jun 14th, 2007, 02:02 PM
#4
Addicted Member
Re: [RESOLVED] store variable from combo box list
Form3.Text1.Text = Combo1.List(Combo1.ListIndex)
or.. in Form2
Form3.Text1.Text = Form2.Text1.Text
- If you found my post to be helpful, please rate me.

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|