Displaying 2nd field from table

Keiath

Registered User.
Local time
Today, 19:39
Joined
Jan 6, 2012
Messages
104
I have query that comes from 1 table, however one of the fields gets its data from another table and stores the results (from a combo) in the field.

The data from the second table has 2 data types, ID which is the primary number and 2 A text field

on the query i want the text field to display not the ID number

How do I do this?
 
Keith, I do not understand what you mean by one if the field gets its value from a combo box.. Sounds to me like you are using lookups in table level. It is not recommended to do that.. Lookup "Evils of lookup in table" it will tell you why this is a problem..

Remove the lookup by changing the field to text in design view, and then use a join to display the required text.. I am unable to give you screenshot as I am not on my system right now..
 
Keith, I do not understand what you mean by one if the field gets its value from a combo box.. Sounds to me like you are using lookups in table level. It is not recommended to do that.. Lookup "Evils of lookup in table" it will tell you why this is a problem..

Remove the lookup by changing the field to text in design view, and then use a join to display the required text.. I am unable to give you screenshot as I am not on my system right now..

Hi no look ups in table i look up in the form and store that data from table two into table 1.

but it only displays the ID (primary key) and not the second data of Text
ID Text
1 Unknown
2 Deficit
3 Surplus

its the text i want displayed in the query not the ID number which it is currently showing

Hope that makes sense
 
Okay in the Query use a JOIN between the two tables.. and then use the text field.. something like..
Code:
SELECT tableOne.theFields, tableTwo.textField 
FROM tableOne INNER JOIN tableTwo ON tableOne.theIDField = tableTwo.IDField
So when you join the two tables on the ID, and use the textField to display you will be able to see your Text field..
 

Users who are viewing this thread

Back
Top Bottom