how to copy combo box ?

like this .

i has 2 combo box.

combo A and combo B,

now the combo A i connected it to data 1
and combo B i did not connect it to data1. so now i want a code which can copy over the data or the text in combo A to the combo B.

whats the code please.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Private Sub Command1_Click()
    Combo2.AddItem Combo1.Text
End Sub

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JOHNHOAuthor Commented:
nothing happend. i already put      Combo2.AddItem Combo1.Text

why ?

by the way why my combo A that connected to data1 did not show all the data that inside the field ? what i mean is my combo A connected to data 1 and the field is ABC. and inside abc thats a lot of data. why it did not show in the combo A ?

The reason "nothing happens" is probably because Combo1.Text is empty. Combo.Text is the top box where the selected item goes.

How do you have comboA connected to Data1?


ComboA.AddItem = Data1.Recordset!ABC
JOHNHOAuthor Commented:

does the code sound like this ?

ComboA.AddItem = Data1.Recordset!my database name

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.