Solved

Combo, listbox

Posted on 1998-07-20
7
163 Views
Last Modified: 2010-05-03
This may be an easy question.  With the combo box, list box, ect.  I am using it to connect to an access query.  I selected a specific field and recordsource for it.  I only has the first record visible in the drop down box.  How do I change it so It has all records?

EG.

connect to access.
Have 20 names in names table
choose lastname as recordsource
only has 1 name in drop down box, should be 20.


thanks!
0
Comment
Question by:DAVIDH
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 1

Expert Comment

by:DQ
ID: 1466254
Using the DBCombo and DBlist controls.
0
 

Author Comment

by:DAVIDH
ID: 1466255
I am using the controls thats not the problem, the controls ONLY show the first record in the drop down box.  I want all the records.
0
 

Author Comment

by:DAVIDH
ID: 1466256
I am using the controls thats not the problem, the controls ONLY show the first record in the drop down box.  I want all the records.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Expert Comment

by:Dalin
ID: 1466257
DAVIDH,
Assume you are using a datacontrol

You need to specify the Rowsource (the datacontrol for the table,  and then set the listField to the column you want to show.

If you need help on doing that, let me know
Regards
Dalin
0
 

Author Comment

by:DAVIDH
ID: 1466258
Dalin,

I have done all of that.  In my message I said what the problem is.   It connects to the database, connects to the query, connects to the recordsource, but when I click the down arrow on the drop box, it only shows the first record, all the others are blank.  I want it to be filled with all the records.  

When I click the arrow control on DATA1  it will move to the next one, and so on, but I want the user to be able to choose from a drop down box, similar to the way they would in access.


Thanks
0
 
LVL 9

Accepted Solution

by:
Dalin earned 50 total points
ID: 1466259
DavidH,

What I show is additional to what you have done.

What you have done it to bind the combo to the recordset, which automatically shows the value of the field you connect to, but only one at a time.

To show the whole list from a field of the table, you need to have a dbCOmbo and set the rowsource and list field.

The other way is to put all the records (the 20 some) in the List property of the regular combo, but you need to do that everytime a new value added to the field.

Let me know If I did not make myself clear.

Regards
Dalin



0
 
LVL 18

Expert Comment

by:deighton
ID: 1466260
Dbcombo.style = 2 '(Dropdown List)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

749 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