Two queries, two reports. The first query takes a company name as input and returns all towns in which that company has an office. The second query returns company, town(ie office location) and number of orders, ordered by number of orders descending.
The first report is based on the first query, the second on the second. The second report is a subreport in the first, linked on the town field.
What the combined report does is to return a "league table" of companies for each town in which the input company has an office. I'd like to limit the number of results for each "league table" to 10 (ie get the subreport to return a maximum of 10 results per town).
The wrong way of doing it is to put the SELECT TOP 10 in the second query!
I've seen some posts about putting a counter text box in the report and there is an MS article on this but it seems only to relate to pre-Access 2002, which is what I am using.
Anyone who can explain it in simple terms will be much admired by this amateur.
Henry
The first report is based on the first query, the second on the second. The second report is a subreport in the first, linked on the town field.
What the combined report does is to return a "league table" of companies for each town in which the input company has an office. I'd like to limit the number of results for each "league table" to 10 (ie get the subreport to return a maximum of 10 results per town).
The wrong way of doing it is to put the SELECT TOP 10 in the second query!
I've seen some posts about putting a counter text box in the report and there is an MS article on this but it seems only to relate to pre-Access 2002, which is what I am using.
Anyone who can explain it in simple terms will be much admired by this amateur.
Henry