Unbound combo box not displaying all fields

lscheer

Registered User.
Local time
Today, 00:34
Joined
Jan 20, 2000
Messages
185
I have created numerous unbound combo boxes in my time working with Access. For some reason, now, one of my cbs will only display data from the key field column, not the data column. It is set up to be based on a simple SQL statement drawing from the table (only 2 fields in the table), to display on a form that is then using the value to filter results. Column count is 2, appropriate column widths set, bound column is 1 (key field), etc. All is normal and the same structure works on other tables/queries in the db and they work fine. I have tried removing the box and recreating it, using a query instead of SQL, showing/hiding columns, etc. and nothing so far has worked.

The key field displays just fine but the important one (for display) does not. Any ideas on what could be going on?

Using Access2003 on a stand-alone machine
 
Look at the row source and run the query in there to ensure that field is visible. Check that the Show box is ticked in the query.
 
Yes, when I tried the query option (instead of straight sql) the query ran just fine and all fields and records displayed
 
Did you do it via the Row Source?

What column width's did you set?
 
Yes, row source was set to the correct sql/query and column widths were originally 0;3 so as to hide the key field but even with them set to 1;2 (or any other number) only the key field displays any values.

I have also compacted/repaired the db
 
Then what is your SQL Statement? (the one that didn't work)
 
SELECT tblIngredients.IngredientID, tblIngredients.IngredientName
FROM tblIngredients
ORDER BY tblIngredients.IngredientName;

attached is a sample db with the form; it is the Ingredients combo box that is the problem.
 

Attachments

The "ingredient name" should be showing. In the Ingredient combo box on the form only the ingredient ID shows up in one column; the other is blank.
 
The db you posted still does the same thing; all I can tell that you changed were the column widths so as to hide the key field. While that is my ultimate intention, the main issue is that the ingredient name field is still blank. Also, for clarification, none of the combo boxes are cascading; they are all independent meant to be an option for user-selected criteria (they can select one value from each combo if they want, but they are not dependent on each other).

thx
 
I had tested it before sending it to you and it was showing on mine. I also set the Decimal Places property to Auto because you had it as 2.

This could be a bug. What version of Access are you using?
 
Yes, I had been trying to mess with all the properties to see if it changed anything and must have forgotten to set the decimal property back. I can make a selection in the combo box (even though I can't see what I'm selecting) and it puts the selection into the text box as expected, I just can't see the list.

I'm using 2003 and the odd thing is that all my other combo boxes in all my other databases work just fine...
 
I've also tried re-creating the table that is the row source to no avail
 
Were you referring to the hotfix or the format property?

Also remove all formatting in the table and query (the combo box is based on) as well, if there's any.
 
Just fyi, I think there would have been another way of getting round that but it's alot better with the hotfix. You would also need the hotfix for all users by the way:)

Glad that solved your problem.
 

Users who are viewing this thread

Back
Top Bottom