Hello,
I am a novice Access user and have a database I need help with. I know there have been multiple threads similar to this, but I think my situation is unique, so I hope this is not a repeat. My database has one table that is a linked ODBC table and a lookup table I put together. I have a make table query that turns the linked table into a static table. There are no primary keys in my tables as this is not possible since it has repeating data (sales data).
One of the fields/columns of my static sales data table (tbSalesData) has a code for a product category. What I am trying to do is create a query/lookup/whatever so that I can take that product code and turn it into text that is the actual category. Here is an example of my tables
tbSalesData
SKU Sales Cost ProductCategoryCode
tbCategoryLookup
ProductCategoryCode CategoryDescription
So I am trying to essentially equate ProductCategoryCode in tbSalesData to CategoryDescription in tbCategoryLookup. I feel like all my efforts are in vain because the lack on keys. Anyway- I certainly appreciate nay help that can be provided.
Thank you very much!
Last edited by learning_vba; 07-26-2011 at 02:04 PM. Reason: Solved
Hi,
In the table tblCategoryLookup, are there duplicate entries of the ProductCategoryCode? If not, then it is a primary key in that table. You can use it (with a join) to create a query to give the results you seek.
Cheers,
“To sin by silence when they should protest makes cowards of men.” ~ Abraham Lincoln
Hi- thank you for your response. There are no duplicate entries- each one is unique, so I am glad to hear this is possible. I really appreciate your response, and if you would be willing, I would greatly appreciate instructions on how to make the query with the join.
Thank you!
I have figure it out - thanks so much!
Last edited by learning_vba; 07-26-2011 at 02:03 PM. Reason: Figured it out!!
Sure,
First, I recommend opening the table design view for tblCategoryLookup and setting the ProductCategoryCode as a primary key.
For the query:
1. Create a select query (in design view)
2. Add the two tables to the query
3. Join the tables on the ProductCategoryCode by dragging one field and dropping it on the other.
Select whichever fields you'd like to see for display and run the query.
Cheers,
“To sin by silence when they should protest makes cowards of men.” ~ Abraham Lincoln
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks