[Webinar] Streamline your web hosting managementRegister Today


how to copy combo box ?

Posted on 1999-11-06
Medium Priority
Last Modified: 2010-05-02
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.
Question by:JOHNHO
  • 2
  • 2

Accepted Solution

danlevans earned 100 total points
ID: 2188641
Private Sub Command1_Click()
    Combo2.AddItem Combo1.Text
End Sub

Author Comment

ID: 2188991
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 ?


Expert Comment

ID: 2189429
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

Author Comment

ID: 2204724

does the code sound like this ?

ComboA.AddItem = Data1.Recordset!my database name


Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month9 days, 23 hours left to enroll

591 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question