Displaying Column 1 instead of 0 in query

sdchris

Registered User.
Local time
Today, 05:35
Joined
Nov 12, 2009
Messages
14
I searched and couldn't find a solution to this most likely easy problem. I'm sure someone out there smarter than I can help me out real quick.

I have a combo box which queries a table and then stores said tables primary key field in a field for my main table. The table queried has two fields; one for the primary key and the other for the string, such as "chris".

My problem is when I run new query from the main table it shows the bound column, which is the primary key, instead of the string column which would display my name. I can't figure out if there is code that I should deposit in the criteria field that would tell the query to display the name field (ala "Chris") instead of the bound column field (ala primary key).

Do I need to add something to the criteria field or run an expression that says display column 1 instead of column 0 in your query? Many thanks in advance.

Chris
 
Change your Column Widths for the combobox. Probably 0";1" but play with it until it fits like you want.

You may also have to adjust the Column Count.
 
Thank you, David.

My problem is not in storing the data. I've got that down. It shows up as a number in the main table.

My problem, which I didn't explain well, is displaying the contents of the 2nd column instead of the bound column (primary key numbers) in a generic query. I don't want it to display the number. I want it to display the names.

Does that make sense?
 
Ah. You'll need to link in the other table that contains the Column 1 data. I don't believe there is any way for a query to access Column(1) directly.

Forms and reports can, but I believe it is through an implicit query.
 
Bummer. I suppose I could go as is since the table I'm querying records from only has 5 entries. When I export to excel I can just replace the specific numbers with what I had listed in my combo box.

If you think of an easy way to go about it, let me know!
 
Just export from a query that links to the definition table of values. Export works as well on queries as it does on tables.
 

Users who are viewing this thread

Back
Top Bottom