Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Business Applications Business Applications
Search Search
Search for:
Tech Support Guy > > >

Solved: Access ComboBox will not display bound column


(!)

Voyagerslife's Avatar
Voyagerslife Voyagerslife is offline
Computer Specs
Junior Member with 5 posts.
THREAD STARTER
 
Join Date: Jun 2009
Experience: Advanced
24-Jun-2009, 02:58 PM #1
Question Solved: Access ComboBox will not display bound column
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's Avatar
OBP OBP is offline OBP is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 18,545 posts.
 
Join Date: Mar 2005
Location: UK
25-Jun-2009, 08:14 AM #2
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.
__________________
OBP
I do not give up easily
Voyagerslife's Avatar
Voyagerslife Voyagerslife is offline
Computer Specs
Junior Member with 5 posts.
THREAD STARTER
 
Join Date: Jun 2009
Experience: Advanced
25-Jun-2009, 10:37 AM #3
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's Avatar
Voyagerslife Voyagerslife is offline
Computer Specs
Junior Member with 5 posts.
THREAD STARTER
 
Join Date: Jun 2009
Experience: Advanced
25-Jun-2009, 10:41 AM #4
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's Avatar
Voyagerslife Voyagerslife is offline
Computer Specs
Junior Member with 5 posts.
THREAD STARTER
 
Join Date: Jun 2009
Experience: Advanced
25-Jun-2009, 10:53 AM #5
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's Avatar
Voyagerslife Voyagerslife is offline
Computer Specs
Junior Member with 5 posts.
THREAD STARTER
 
Join Date: Jun 2009
Experience: Advanced
25-Jun-2009, 10:57 AM #6
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".
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


Tags
access 2003, combobox

(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑