Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show category not foreign key?

Status
Not open for further replies.

WPCC

Programmer
May 21, 2002
4
US
I have a member table that has Category field that links to a different table of categories. I'm trying to make a report that will sort based on the members category and display the categories. In my members table I am using a dropdown combo box to select the category from a list based on a query. It stores the information as an Integer, the category ID from the category table. This seems like a very simple problem but I can't figure out how to display that information on my report. I have a field that is linked to the category field in the members table but it only displays the number and I want to display the name of the category that number refers to and sort by that.
 
Base your report on a query. Include both your members table AND categories table. Link tblmembers.category with tblcategories.categoryID, then make tblcategories.yourcategorynamefield a field in your query results and your report.

SELECT tblMembers.somefield, tblcategores.category,
FROM tblMembers INNER JOIN tblCategories ON tblMembers.category= tblcategories.categoryID;
 
Thank you for your help. For some reason I just don't think like Access.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top