Crosstab query column heading displaying

Yu2008

Registered User.
Local time
Today, 13:17
Joined
May 7, 2008
Messages
44
I am new to Access, and trying to set up a database for tracking warehouse inventory. Since we stock goods in different warehoue, what I am doing now is creating a crosstab query in which row heading shows the product model, and column heading shows the different warehouse name. The problem what I have is the column heading of the crosstab only shows the number of WarehouseID in stead of the warehouse name which the ID corresponding to. I try to resolove this by creating relationship between the query and the table of the warehouse name. But it doesn't solve the problem.

Can anyone help me on this? Thank you :)
 
Simple Software Solutions

Assuming you created this crosstab using the wizard you must have picked the warehouse ID as the column heading.

In the query add your warehouse names table and create a join between the FK in the original table and the PK in the names table.

Next drop down to the column heading column and change the table to the warehouse names table and change the field to the warehouse name.

Save your query and retry.

CodeMaster::cool:
 
Hi CodeMaster, Thanks!

Hope this is not a dumb question again, what does PK and FK mean? Thanks.

Yu
 
Hi CodeMaser, I just got home and can't wait to work on my Access project. Yeah! just like you said I change the field to warehouse name, and it works! Thank you : -) Though I still don't know what PK and FK is 8-)
 
PK = Primary Key. It is a unique column or set of columns in a table that uniquely (redundant) defines a row within the table. There is also a concept called a surrogate primary key or an artificial primary key. These are programming constructs that make it easier to deal with primary keys system wide. I almost always use surrogate primary keys exclusively, whether I need them now or not. Many Access developers (not all) use the column name "ID" as the surrogate primary key. This may be because of Access' default behavior. Also, having a primary key named "ID" can make it easier to write case tools for your own databases.

FK = Foreign Key. It is a column in a table that holds the value of a primary key within another table. A pointer to the record that has that value as its primary key. This is the magic and joy of the relational database model.

Asking questions like this will get you lots of points with the geeks on this forum. It's a topic very near and dear to our hearts. I'm just happy to have brought you into the family!
 

Users who are viewing this thread

Back
Top Bottom