ComboBox Help

alfred67

Registered User.
Local time
Today, 04:04
Joined
Jan 26, 2010
Messages
65
I have the following table:

acctable
acc a No--123
acc b No--456
acc c no--678

I want to list 123,456,678 in a combo box. When I place my Combobox in my form it comes out in column 123,456,678. But I need come out in a row
123
456
678

Any help would be great

Alfred67
 
so, if I understand it correctly,
you don't want to have a combobox open vertically with from top to bottom
123
456
789
instead you want your combobox to show only one line, and horizontally present
123, 456, 789 ?
what you could do is make one String:
Code:
do
comboString = comboString & "; " & recSet.fields(2)
recSet.movenext
loop until recSet.EOS = true
and then add the string to the combobox. of course you won't be able to select anything seperately
 
I don't think you've represented your table structure properly. If your table is designed like this:
Code:
acctable
--------------
[COLOR=Blue][B]acc            No[/B][/COLOR]
a             123
b             456
c             789
Then I see no reason why it wouldn't appear the same way in your combo box.

If you want to see all the items at once then maybe you're referring to a listbox.
 
Sorry if a confused you. I have attached screen shots that should clear it up.

Screen shot 1 --is my Account table
Screen Shot 2 --is table in view mode
Screen Shot 3--shows my combo box

See how the acct numbers go horizontal I need them to go vertical and allow me to pick anyone.

Hope this helped to clear things up.

Alfred67
 

Attachments

This is actually due to the design of the tables. It's because it's not properly normalized that's why it's difficult to achieve what you want and any solution that is offered now would cause more problems. How big is your database?
 
"how big is the database" It's 8mb but if I zip it's 1Mb

If I change Row source type to Field List it will give me a list of the field names maybe I can work with that

Alfred67
 
Last edited:
A DLookup will work and fail in the future and we're talking about very slow returns.

I think your database is small enough for you to start thinking about normalizing and getting your structure right first. If you want to go ahead, here are some links on this:

http://r937.com/relational.html
http://www.databasedev.co.uk/database_normalization_process.html

You can also check out the General and Theory of Design sections of the forum for further info. And there's also the option for posting a question if you require help.
 

Users who are viewing this thread

Back
Top Bottom