Solved

combooooo

Posted on 2000-03-18
4
181 Views
Last Modified: 2010-05-02
i have a combo in a form
i want to load in this combo 2 field
but when i choose from this 2 field just one field fil the combo any field
of  the tow
thanx yaco
 
0
Comment
Question by:yaco
4 Comments
 
LVL 6

Expert Comment

by:Marine
ID: 2631484
explain again. You want to load combo2 values into combo1 ? or just a selected item fromthe combo2
0
 
LVL 7

Expert Comment

by:Vbmaster
ID: 2631553
You can only select one item using a combobox, if you want to select multiple items you want to use a listbox instead with the MultiSelect property set to True.
0
 

Author Comment

by:yaco
ID: 2632271
i want to load 2 field in one combo
and select one of tow field
EX . i have a table with this filed
code , name
i want to load these 2 field in combo
and choose name to submit code field in the combo or the code field show in the combo  when i choose by name
0
 

Accepted Solution

by:
john_price earned 50 total points
ID: 2634186
Assuming the code field is numeric, you can save the code in the itemdata array:

  combo1.additem "LastName"
  combo1.itemdata(combo1.newindex)= codevalue



To use the code when the user clicks a a value:


  debug.print combo1.itemdata(combo1.listindex)


0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help in WHSCRIPT 9 47
using Access 8 59
Hide vba in gp 7 83
Excel Automation VBA 19 37
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

920 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now