Link to home
Start Free TrialLog in
Avatar of David Bigelow
David BigelowFlag for United States of America

asked on

How do I remove the table level lookup and have a query return data instead of the primary key

Since I'm just now starting to understand db normalization and using forms to lookup data from one table to reference it into another table, I now understand that my database has a lot of structural flaws, but, it's working. Or in this particular case, I'm getting it to work.

On a part of the database that is not too critical, (not a lot of interactive connections) I want to start to understand how I should have structured things.

My end desire is to have the Banks in the quniClassAndIndividual query display the bank letter instead of the primary key when I use the query in the report, rpt_Training_Employees.

In this Sample database that I've uploaded, I used to have a table level lookup in the AM_Operators table to the Banks table. I changed it to a textbox. So now, the bank column in the AM Operators table lists the primary key, which, as I understand, it should. My questions are several, since I'm making these changes:
1. Should I change anything relationally between the AM Operators and Banks tables?
2. Do I need to change any formats in the Bank fields (Text, Long Integer)?
3. What do I need to change in the query, quniClassandIndividual, in order to have it output the Bank letter instead of the primary key?

Thank you for your help in better understanding!
SampleSkills.accdb
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of David Bigelow

ASKER

Pat,
To clarify for myself, so even though the data type is number in both tables so that they can have a relationship, the data in the field can still be text? That's how it is in the table I uploaded, but it just seems quirky that the data type would be identified as number and still allow alpha.
Rey,
This query grew from a design query where it was easy to see the logic behind the inner joins; that was several iterations ago of this query. I'm trying to wrap my head around the changes you made so that I can implement them for the Skill_ID, Shift, and Status to see the data instead of the primary key, but I'm getting lost in the trees. Plus, it seems you reordered some of how the query is structured - I can't say for sure. Would you mind posting the query in a line by line manner that pulls out the hinge details. Or maybe write out the thought process used. Or, some way that I can understand how to follow the logic? If you have time for that, I think it would help me in catching the rest of the fish, myself.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial