Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populating a listbox from a combobox

Status
Not open for further replies.

SpyderMan1234

IS-IT--Management
Feb 26, 2004
35
US
OK guys...basic question here I know, but I just cannot figure out what's going on.

I have a simple combobox and listbox setup where the user selects values from the combobox and as they are selected, they appear in the listbox. My problem is that I cannot get the combobox's selection to appear in the listbox. Here's the code that I'm using on Combo_AfterUpdate:

Me.listbox.RowSource = Me.combobox.Value
Me.listbox.Requery

There is nothing in the Row Source property of the listbox and it's set to Column Count 1, Bound Column 1 and Column Width 1". Am I missing something incredibly simple? I'm sure that's the case. I'm running Access 97, by the way.

Any help is appreciated. Thanks
 
Hi!

What is the RowSourceType? It should be set to Value List in this instance.

That said, what is the row source of the combo box? Sometimes you can add an yes/no field to the table and then use that field in a couple of queries to easily move the data back and forth between the two boxes (be they list or combo).

hth


Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
Jeff

I actually figured out the problem right after I posted the question...wouldn't you know it?? Thanks for your help though!
 
SpyderMan1234, what did you do to make it work? I'm trying to do the exact same thing.

Please tell me what properties you set in the COMBO BOX; Conrtol Source, Row Source Type, Row Source.

And the LIST BOX; Control Source, Row Source Type, Row Source.

I really don't understand the exact match up of these properties to make this work. Your answer would help save an associate at work 5 hours a day. Any help is greatly appreciated.

Thanks,
Doug
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top