# Solved: Access ComboBox will not display bound column



## Voyagerslife (Jun 24, 2009)

I am in the process of testing Access 2002 .MDBs in Access 2003. The problem #1 is this: When using SQL, a Query, or a Table to populate a combo box, the 1st Column will not display in the dropdown list. I am displaying 2 columns, with the bound column being column #1. Access will save the data from column #1 and display it in the box after selection. 

The associated problem is: If I change the bound column to #2, the drop-down list displays the same (#1 invisable and #2 visible). The data from column #2 will not display in the field after selection, but will be saved to the forms associated table correctly. When the saved record is re-displayed the combobox field will display empty, even though the data is in the record.

The corporate OS is XP Pro. I have read that there is a compatability issue with Access 2003 and the XP Pro. 

Changing the Corporate OS is not an option.

Field lists and Value lists work perfect.

I have imported from 2002 and created new cbo's in 2003, they both work the same even in the 2002 and 2003 mdb.

I can develop a work around, but does anyone have a solution to this problem?

Thanks.


----------



## OBP (Mar 8, 2005)

Welcome to the Forum.
The normal way that a Combo works is to have the item's ID in the first and Bound column and not hidden, the second column shows the associated text that goes with the ID. If you want to see the Text and not the ID set the first column's width to 0cm.
It will now save the ID as it should but show you the text.


----------



## Voyagerslife (Jun 24, 2009)

OBP Thank you for your reply, I appreciate the help. This problem relates to Access 2003 with my OS being XP Pro. I don't use OS Vista, so I don't know whether the problem exists there. 

The short version of my problem is: I use single field tables to populate my ComboBox's because the lists are easy to maintain by the user. My problem was when using these tables/fields in a ComboBox on a form w/ Column Count = 1, Bound Column = 1, Column Heads = No - that the data from the table would not be displayed in the ComboBox. 

The problem is created when the you set a FORMAT property for the FIELD in the table. I was using the ">" to change the text to upper case. Once I removed the field formatting in the table . . . the data displays as desired.

THE SOLUTION: When creating fields, in a table, do not use the FORMAT Property. You can use something like the following SQL to store the data in uppercase when your user enters data in a form:

Private Sub NAME1__Exit(Cancel as Integer)


----------



## Voyagerslife (Jun 24, 2009)

I hit the wrong key.

To continue the solution:

Private Sub NAME1_Exit(Cancel as Integer)
If IsNull(NAME1) Then
Exit Sub
Else
Dim strNameOne as String
Dim strField as String


----------



## Voyagerslife (Jun 24, 2009)

Let's try again:

Private Sub NAME1_Exit(Cancel as Integer)
If IsNull(NAME1) Then
Exit Sub
Else
Dim strNameOne as String
Dim strField as String
strField = Me!name1
strNameOne = StrConv(strField, vbUpperCase)
Me!Name1 = strNameOne
End If
End Sub

Use this when you exit the date entry field.

And thanks to my Associate for discovering the Format Property solution.


----------



## Voyagerslife (Jun 24, 2009)

I don't know what's wrong today, I can't type at all.

Correction: "Use this when you exit the DATE entry field" should read 
"Use this when you exit the DATA entry field".


----------

