A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Crosstab query and Lookup field problem



 
 
Thread Tools Display Modes
  #1  
Old December 7th, 2009, 03:17 PM posted to microsoft.public.access.queries
Andy C Matthews
external usenet poster
 
Posts: 9
Default 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  
Old December 7th, 2009, 03:33 PM posted to microsoft.public.access.queries
Duane Hookom
external usenet poster
 
Posts: 7,177
Default 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  
Old December 7th, 2009, 03:39 PM posted to microsoft.public.access.queries
Andy C Matthews
external usenet poster
 
Posts: 9
Default 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  
Old December 7th, 2009, 08:12 PM posted to microsoft.public.access.queries
Duane Hookom
external usenet poster
 
Posts: 7,177
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:49 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.