Filtering a crosstab query- maybe? (1 Viewer)

JessicaTZ

New member
Local time
Today, 20:10
Joined
Jul 29, 2020
Messages
3
I'm not sure if filtering is actually what I want to do? I'm a total newbie, so please be patient with me!

I'm doing wildlife research, and have a ton of data relating to when and where I've seen giraffe of a certain age and sex. I have 2 big sets of data that are related- one that gives information about each group of giraffe I see (the season, the specific transect route, total numbers in the group, etc) called Occurrence Data- and one that has details on each individual (age, sex, other biologic parameters, etc) called Individual Data. I've set up 2 separate union all queries that merge the sheets for the Occurrence Data from each day of work (Occurrence Compilation) and the Individual Data from each day of work (Individual Compilation). I've created a relationship between these 2 compilations that links the unique Occurrence Number, so Individuals can be linked to the Occurrence and the geographic/time data.

Then I've created a new query that pulls out the season, transect, age, and sex for every individual. I can make a crosstab query from that that gives me a table like this:
1596012325621.png

But this is for all the individuals ever recorded. I'd like to be able to filter this crosstab to only show me individuals from a particular season or transect. Ideally I'd like to do this using a form. I've already got a form that I use to filter the Occurrences that I see based on these parameters, I just can't figure out how to make it work for a crosstab query.

I only barely know how to use SQL enough to have done a Union All query, so if this needs SQL I will likely need some serious hand holding! I hope you all can help me out here!

Thanks
J
 

arnelgp

error reading drive A:
Local time
Tomorrow, 01:10
Joined
May 7, 2009
Messages
9,872
you should be able to do that when add Criteria to the Source Query of your Crosstab Query.
 

JessicaTZ

New member
Local time
Today, 20:10
Joined
Jul 29, 2020
Messages
3
you should be able to do that when add Criteria to the Source Query of your Crosstab Query.
So I have done this- I use a form to filter the query that is the source for the crosstab, but then I get error messages when I try to run the crosstab. Then I tried to fill in the Parameters box as suggested by the allenbrowne site that was recommended by someone else, and now I just get a blank table that only has an Age column, and no row headings at all and no data in it.
 

June7

AWF VIP
Local time
Today, 09:10
Joined
Mar 9, 2014
Messages
3,243
Provide sample raw data and your attempted SQL statement. If you want to provide db, follow instructions at bottom of my post.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom