Having a combo box with different column values

shabbaranks

Registered User.
Local time
Today, 11:23
Joined
Oct 17, 2011
Messages
300
Hi,

Am I correct in thinking the only way to have a combo box with different values in each column is to create a table and then bind the combo box to the column you are referring to if you want it to represent a value from another.

For example if I have a combo box with the words January, February etc can that combo box have a corresponding month number value in a separate column (this combo would be derived from a list) or would I need to create a table holding both the month names and numbers and then bind to the name value for selection but use the month number value?

The reason I ask is I wasn't sure if for every type of list I wanted with multiple column values, I would need to create a table.

Thanks!
 
I am not sure if I follow you 100%, but the general idea behind tables is that, you have ID which will be the Primary key and then the information related towards the ID. So a twisted answer to your question is yes. You will have two columns, one ID (Number) corresponding to the Month Name. So when you want to see the Monthname in the combo box, you will do.
Code:
SELECT tableName.ID, tableName.mthName
FROM tableName
ORDER BY tableName.ID;
Then have the Column width properties as 0cm;2.54cm. This way the Bound column would be still Column 1, but it will be hidden from view.
 
The reason I ask is I wasn't sure if for every type of list I wanted with multiple column values, I would need to create a table.
For sure: NO
But you must to create a query for the list's Row Source.

And, also for sure :) , you should develop your skills.
For example I know that this function exist (or I think that a function like this should exist) so, a bit of Google and.... http://www.techonthenet.com/access/functions/date/month.php

Good luck !
 

Users who are viewing this thread

Back
Top Bottom