Crostab query as a sub query?

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
 
D

Duane Hookom

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?
 
S

Suzanne Wyatt

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
 
D

Duane Hookom

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.
 

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