If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Crosstab query and Lookup field problem
Hi there,
I'm trying to create a Crosstab query that shows a Class of Business on the rows, Status along the columns and a total number of Projects as the values. The trouble is, the Project Status field is a lookup from another table, so though the Crosstab query works, along the top it shows 1, 2, 3, 4 etc as the column headings instead of Investigating, Estimating, On Hold...etc. I can't seem to find a way around this, can anyone help? Many thanks |
#2
|
|||
|
|||
Crosstab query and Lookup field problem
That's just one of the many reasons why many of us "seasoned" developers shun
lookup fields. If you want to display the actual status, include the table that stores the actual status. This would be the table with records like: StatusID StatusTitle 1 Investigating 2 Estimating 3 On Hold 4 FUBAR ;-) Join the appropriate numeric fields so you can include StatusTitle as the Column Heading. -- Duane Hookom Microsoft Access MVP "Andy C Matthews" wrote: Hi there, I'm trying to create a Crosstab query that shows a Class of Business on the rows, Status along the columns and a total number of Projects as the values. The trouble is, the Project Status field is a lookup from another table, so though the Crosstab query works, along the top it shows 1, 2, 3, 4 etc as the column headings instead of Investigating, Estimating, On Hold...etc. I can't seem to find a way around this, can anyone help? Many thanks |
#3
|
|||
|
|||
Crosstab query and Lookup field problem
Thanks Duane, that worked a charm!
I'm beginning to see, like you say, that lookups are a pain and should be avoided... Perhaps you can assist with a similar problem. In another query, I have two fields (Project Manager A and Project Manager B) pulled through from a table, where each of those fields is a lookup (with a predefined list of 'A' project managers and 'B' project managers). This works fine, with the Project Managers names, not ID numbers, showing up. However, when I create a new field that concatenates these together (PMs:[ProjectManagerA] & [ProjectManagerB]), I end up with the ID numbers...any ideas? :-) "Duane Hookom" wrote: That's just one of the many reasons why many of us "seasoned" developers shun lookup fields. If you want to display the actual status, include the table that stores the actual status. This would be the table with records like: StatusID StatusTitle 1 Investigating 2 Estimating 3 On Hold 4 FUBAR ;-) Join the appropriate numeric fields so you can include StatusTitle as the Column Heading. -- Duane Hookom Microsoft Access MVP "Andy C Matthews" wrote: Hi there, I'm trying to create a Crosstab query that shows a Class of Business on the rows, Status along the columns and a total number of Projects as the values. The trouble is, the Project Status field is a lookup from another table, so though the Crosstab query works, along the top it shows 1, 2, 3, 4 etc as the column headings instead of Investigating, Estimating, On Hold...etc. I can't seem to find a way around this, can anyone help? Many thanks |
#4
|
|||
|
|||
Crosstab query and Lookup field problem
Again, include the table(s) that store the actual values in your query.
-- Duane Hookom Microsoft Access MVP "Andy C Matthews" wrote: Thanks Duane, that worked a charm! I'm beginning to see, like you say, that lookups are a pain and should be avoided... Perhaps you can assist with a similar problem. In another query, I have two fields (Project Manager A and Project Manager B) pulled through from a table, where each of those fields is a lookup (with a predefined list of 'A' project managers and 'B' project managers). This works fine, with the Project Managers names, not ID numbers, showing up. However, when I create a new field that concatenates these together (PMs:[ProjectManagerA] & [ProjectManagerB]), I end up with the ID numbers...any ideas? :-) "Duane Hookom" wrote: That's just one of the many reasons why many of us "seasoned" developers shun lookup fields. If you want to display the actual status, include the table that stores the actual status. This would be the table with records like: StatusID StatusTitle 1 Investigating 2 Estimating 3 On Hold 4 FUBAR ;-) Join the appropriate numeric fields so you can include StatusTitle as the Column Heading. -- Duane Hookom Microsoft Access MVP "Andy C Matthews" wrote: Hi there, I'm trying to create a Crosstab query that shows a Class of Business on the rows, Status along the columns and a total number of Projects as the values. The trouble is, the Project Status field is a lookup from another table, so though the Crosstab query works, along the top it shows 1, 2, 3, 4 etc as the column headings instead of Investigating, Estimating, On Hold...etc. I can't seem to find a way around this, can anyone help? Many thanks |
Thread Tools | |
Display Modes | |
|
|