Subform based on crosstab query

P

Peter Trieb

I'm working on a database dealing with insect collections.
Each record in the collection table has an index (serial
number), the species ID and the exact date when it was
collected. I have a crosstab query which looks like this:
row is the species ID, columns are the calendar weeks of
the collection dates and the values are calculated as Count
(serial number). This works perfectly well and gives me
per species ID the number of insects in the collection
that have been found in calendar week X.

Of course, I have a form A which displays all this (still
works perfectly well when used alone). I also have a form
B which has, apart from other stuff, the species ID in
use.

If I use form A as a subform within form B and link the
two forms by the species ID, the subform A does not work
any more: instead of showing that e.g. in week X 10
insects have been found and in week Y 15, it only shows
that ONE insect has been found in week Z. And week Z is
the collection week of that record which has the lowest
serial number and equals the selected species ID of my
master form B.

In other words: it seems that the crosstab query stops
counting after it has hit the first matching record. Why
is that happening? Any help appreciated !!!

Thx,
-Peter
 
D

Duane Hookom

Try set the Column Headings property of your Crosstab query to all possible
column heading values.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top