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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cross tab querry

Status
Not open for further replies.

loneranger27

Programmer
Apr 22, 2003
94
0
0
US
Hi,

I am a newbie to access and I have a tabel arranged in columns and rows that I want to pick a certain value from. The user enters the column heading and the column heading but I can't find any help on how to select the value of the selected cell.

e.g

population 1 2 3 4 5 6 7
300 2 3 4 [5] 6 7 8
200 3 4 5 6 7 8 9

The user enters the population (300) and he enters 4 from the column then i want to retrieve the value 5. I hope that this is somewhat clear any help is greatly appreciated.

lranger
 
Hi there,

My solution to this would be actually store the data in a 3 column table rather than a matrix. e.g.

1 300 2
2 300 3
3 300 4
4 300 [5]
5 300 6
6 300 7
7 300 8
1 200 3
2 200 4
3 200 5
4 200 6
5 200 7
6 200 8
7 200 9

To get the [5] out in a query result, you just need a query of this 3 column table asking for parameters for column 1 and column 2.

(You can also regain your display of the data as a matrix by a crosstab of this table).

Hope this helps, jobo123
www.dbLetterWriter.com
 
Great it works I was trying to build the table in the wrong way. Thanks for the help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top