Crostab query as a sub query?

  • Thread starter Thread starter Suzanne Wyatt
  • Start date Start date
S

Suzanne Wyatt

I tried to put a picture of my relationships in and it loaded as an
attachment so I'm going to repost without the image.

Relationships: One-to-Many
ClientTable--Program Category Table
ProgramTable
SurveyTable
ProgramCategoryTable--ProgramTable
SurveyTable--ClientTable
Interval Table
SurveyContactTable--SurveyTable
ClientResponseTable--SurveyTable
SurveyQuestionTable
SurveyResponseTypeTable
SurveyResponseTable
I want to create a cross-tab query that counts the client responses to the
question, I think I want to place it as a sub query within the survey table
so that I can retrive data from the client table for sorting the reponses.
I'm not sure I am right though. If you want to see the structure of my
tables I have this question posted with an image of the relationship and the
tables. If you need more information please let me know. Suzanne
 
After reading this posting and your previous posting and printing your
relationships, I am not sure how you want to your results to display/print.
Do you want the questions to create columns in your query or rows?
 
I hope I can get this better understood, Duane. As you can see by my
relationships. The client info table is where all demographic information
is. IE Admit Date-Discharge Date Gender Program Category Program DOB etc.
and the Survey Contact table holds the contact interval (ie 1 month, 6
months(and contact attempt dates both successful and not successful)). What
I want to do is generate reports based on responses with percentages and
charts of yes/no responses.
Like this:
Based on Interval:
1 month post discharge
Questions Responses Count %
q1 question text Yes 1 33
No 1
33
N/A 1
34
Total Responses 3 100
and so on. Does this help? Suzie
 
From what I can ascertain, just start from the tblClientResponses joined
with tblSurveyResponse and then add tables to get the other required fields.
I don't see anything that warrants a crosstab.
 
Back
Top