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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

list/combo boxes

Status
Not open for further replies.

brh01

Technical User
Feb 23, 2003
103
My form uses a few combo boxes. my table has 1 row w/ 200+ items in it. how do I fix my combo boxes so that when they open, the rows with only a few items in them aren't a mile long? when I try to sort assending, there's a ton of blank space before the A's.

thanks in advance

Brian
 
Brian,

What are your other rows attached to? Do they all query the data from the same table? Also, just clarifying, if your table has one row, it also has one column. Is it the row that's long, or the column?
 
Hi, it's a column. there are 5 or six columns and only one long one. The basic question is...is there a way to open a combo box and limit the length of the drop down list to the "data only" and not have to scoll wayyyyy down a blank list below the data. thanks again for the help

Brian
 
Can you please the underlaying SQL code of the combo's RowSource property ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
If you open the query of the combo box, can you not put >"" in the criteria part of the values that appear as empty lines?
 
Brian-
Do you want all columns displayed? If not, then in your rowsource query, just select the fields you want displayed.

For example, combobox.rowsource = "SELECT field6 FROM table" instead of "SELECT field1, ... , field6 FROM table"

If you need those fields, but wish to hide them, then play with Column Count and Column Widths property.

For example, if you just want the 6th column to display, then Column Count = 6, and Column Widths = 0";0";0";0";0";2
 
zor, >"" works w/ most combo boxes, however it doesn't work w/ number lists(they appear totally blank w/ this sort message). is there a reason for this?

thank you all for your suggestions.

Brian
 
Again, any chance you could post the sql code of the RowSource ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
SELECT tbllistinfo.ID, tbllistinfo.[Job#Slist] FROM tbllistinfo ORDER BY tbllistinfo.[Job#Slist] DESC;

Brian
 
You may try this:
SELECT [ID], [Job#Slist] FROM tbllistinfo WHERE Nz([Job#Slist],0)<>0 ORDER BY [Job#Slist] DESC;

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
one more quick question phv, I have a combobox used for filtering a form, using the above referanced combo box data. when i open the filter combo, I see the private id, not the info in the table. is there a quick fix for this?

Brian
 
Set the ColumnWidths to "0;"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
let me rephrase...ID is set to zero, job # is set to 1" but when the list opens it identifies the id instead of job #

job#= 5555 id=1....list should display 5555 but shows 1

Brian
 
The BoundColumn property ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
no, i've tried changing the column# (tried 0-7)

Brian
 
ZOR-
If you didn't set the field value to "", then you can use IS NULL.

Brian-
If you used PHV's SELECT code:
Column = 2
Widths = 0";1"

Another method is to put [Job#Slist] in front of the [ID] and then set the column = 1.
 
hkaing79, What you suggest, is what I've used in that instance and it works fine. but in another combo (which I filter from, the row source code is the following

SELECT tblsavedinfo.ID, tblsavedinfo.reportdate, tblsavedinfo.[penned by] FROM tblsavedinfo;

this displays the proper rows of the table. however, the second column of info just has the row # and not the data I have in the column I'm trying to view.

Brian
 
Are you putting the number of columns in Bound Column or Column Count? You should be putting it in Column count.

I think that's why you keep getting the row#. Because your Column Count is still set to 1. Which means it'll only take the first value, which is 0 if you set Widths = 0";1". Well, I could be wrong. Never worked with Bound Column.

If that doesn't work, then just reorder your SELECT query again. :)

SELECT reportdate, ID, [penned by] FROM tblsavedinfo;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top