In so deep don't know where I am?

back2basic

Registered User.
Local time
Today, 01:52
Joined
Feb 19, 2013
Messages
113
Will someone please tell me where in Access 2010 I can modify the displayed fields of a Combo Box on a form. I need to format the display window and add criteria to one of the fields. Can't remember where I set this up and recently upgrading from Access 2007 isn't helping.

Thank you Dale
 
What are you trying to do? I don't understand your post.

Sounds like rowsource.
 
Yes, I thought it would be hard to explain. Please allow me to try again:

I have a materials table with 11 fields.

On a form of another table A Combo Box was setup ( You know this cboMaterial_ID) in which only three of the fields are displayed on the form in the Pull down window. The Combo Box Row Source has a total of 7 fields.

I recall only wanting those three fields to show and am happy with it. As I recall it was with the "add existing field" option in version 2007.

I have no Idea if it is the form properties controlling what is displayed, the relationship ( when it was setup) or the Combo Box.

I am sure you are happy with this explanation.........Sorry wish I new more but getting there.:)
 
Click on the combo you want to change to select it. In the properties dialog, find the Format tab. You will see three properties that you need to set to control this.
ColumnCount - the number of columns in the RowSource query
ColumnWidths - the width for each column. 0 width hides the column.
ColumnHeads - Yes/No. Yes displays headings for the columns. You can alter the names by using Alias' in the RowSource query.

Select MyLongCompanyName as CoName, .... From YourTable
Order by MyLongCompanyName;
 
Add one more item to Pat's list - Only one item is actually bound to the box. The others are hangers-on associated with the bound column, which is the value of the box if you reference it in code.

Build your ROWSOURCE query. Count the number of items returned. That has to be in the COLUMNCOUNT. The widths of the displayed items is in the COLUMNWIDTHS property in the same order as the fields are returned from the ROWSOURCE query. The BOUNDCOLUMN is usually the PK of the row's source recordset if you have one. But no matter whether you have a PK or not, you need one column to be bound as the value of the box. Oddly enough, it doesn't have to be the value you display, since it is perfectly fair game to make the column width 0 for the PK and other things that are in the hangers-on category.
 
Thank you, Pat and Doc this helped a lot and is the answer I need.
 

Users who are viewing this thread

Back
Top Bottom