View Full Version : Table column to show values


knowledge76
12-11-2008, 01:16 AM
Hi friends,

I am having a table with column A which has either values 1, 2 or 3 now in column B it should show me for 1 True for 2 false and for 3 in process. I am trying to solve it in a way that automatically if either 1, 2 or 3 is entered in the column A the corresponding is shown automatically in column B. Can someone give me a hint to solve it.
Thanks for your responces

namliam
12-11-2008, 01:18 AM
You really should not store values that can be calculated or gotten otherwize.

In this case I would probably make a new table with ColumnA and ColumnB
That way in your Table you only need ColumnA and ColumnB can be found in this addtional table.

Good luck !

knowledge76
12-11-2008, 01:37 AM
You really should not store values that can be calculated or gotten otherwize.

In this case I would probably make a new table with ColumnA and ColumnB
That way in your Table you only need ColumnA and ColumnB can be found in this addtional table.

Good luck !

How should I get the values from the new Table for 1 2 and 3

namliam
12-11-2008, 01:47 AM
By using either a lookup combo box on a form or joining the New table with the original one to add ColumnB virtually to your original table.

knowledge76
12-11-2008, 03:21 AM
Thanks for your responces I come to the solution. :)

knowledge76
12-11-2008, 03:47 AM
Damn it is not working......
What I have done was just getting the values into a combo box. Can you kindly tell me how you would extract the valuies from Table 1 into Table2. sample is attached.

namliam
12-11-2008, 05:08 AM
No I will not show you how to do something which is inherit BAD DESIGN!

You can use a query:
SELECT [Table 2].[Column A], Table1.[Column B]
FROM [Table 2] INNER JOIN Table1 ON [Table 2].[Column A] = Table1.[Column A];

Note: You should really NOT use spaces or special characters in any names....

or use a combo box on a form
Make a new form base it of Table 2, right click Column A > Change to > Combobox
Right click Column A again > Properties
Tab Format, Change Column count to 2, set withs to 0;2
Tab Data, Click rowsource, click the "..." button to the right and make a query based on Table1