ListBox

amerifax

Registered User.
Local time
Today, 01:56
Joined
Apr 9, 2007
Messages
304
I added a ListBox to my form using the ListBox Wizard. I am not sure where I went wrong but this is what I am getting. Instead of getting the Values I put in, I am getting the Number or ID that identifies them. For example I have Camera, Graphic and Time but I am getting 1, 2, and 3. How do I get the value to be stored in my table rather than the ID? Where in the wizard did I go wrong when I was setting this up?

One other question, when I try to sort (with how the field is set now) I get an error that says "Type mismatch in expression."

Any help would be greatly appreciated.

Bob
 
To display the actual values instead of the Record ID values, open your form in design view and select the listbox. Open the Properties window and locate the "Column count" property and set it to 2 (or the number of columns you are retrieving in your listbox). Locate the "Column Widths" property and type in a zero (0) to indicate that the first column should be hidden. If you only have 2 columns it is not necessary to set a width for the second column. If you have more than 2 columns then you can specify a width for each column by separating each column width with a semi-colon (;).
 
To display the actual values instead of the Record ID values...type in a zero (0) to indicate that the first column should be hidden...
Actually, Access has already done most of this!
Instead of getting the Values I put in, I am getting the Number or ID that identifies them
When using the wizard to create a Listbox or Combobox if the underlying Table has a Primary Key Access will automatically add this to the Column Items, making it the Bound Column, by Default. It also automatically sets the Column Width to 0" so you don't even realize that it's part of the Control.

To make whichever Column you want the Bound Column, in Form Design View, simply select the Listbox, then go to Properties - Data and change the Bound Column Property from 1 to the Column Number of the Column you want to be Bound.

Linq ;0)>
 
Last edited:
Since I have already created the forum with a problem I'm only trying to see names, rather than numbers in, in my export. The damage is already done. I'm only trying to recover my 2500 records.

The only obtain I have now is to add a column need to the problem and copy the problem column into the added column.

It's strange that I can see the proper names untill I export. Than I only see the numbers.

I was hoping to be able to convert the numbers into the proper names.

Bob
 
It's strange that I can see the proper names untill I export. Than I only see the numbers.
It's not strange at all; I've just explained why this happened!

Why can't you change the Bound Column, as instructed above, and re-run your 'export?'

Linq ;0)>
 
Last edited:

Users who are viewing this thread

Back
Top Bottom