R
Red via AccessMonster.com
After much research on this site, have come to the following conclusions on
my problem; Frst I need to create a "count " query but have tried to figure
out which fields to add count. Second, I need to create a "Sum" query to
give me the answer to my question. The fields I need to include in my query
is Date, Question number, Answer value and Pass value.
Currently I get a result that looks like
VisitDate QuestionNumber Value PassValue
2/6/2005 001 1 1
5/2/2005 001 1 1
12/15/2005 001 1 1
12/30/2005 001 n/a 1
2/1/2006 001 1 1
2/3/2006 001 1 1
2/6/2005 002 1 1
5/2/2005 002 1 1
12/15/2005 002 1 1
12/30/2005 002 n/a 1
2/1/2006 002 1 1
2/3/2006 002 1 1
Etc...
What I'm trying to accomplish is a result that looks something like this;
Total of Question 1 Total of Value of Question 1 Total
Pass Value for Question 1
12 14
12
Etc...
Hope this make sense to someone :>/
I have inclosed my SQL for you to look at.
SELECT TblVisit.VisitDate, TblQuestions.QuestionNumber, TblAnswer.Value,
TblQuestions.PassValue
FROM (TblVisit RIGHT JOIN (TblAnswer RIGHT JOIN TblRecords ON TblAnswer.
AnswerID = TblRecords.AnswerID) ON TblVisit.VisitID = TblRecords.VisitID)
LEFT JOIN TblQuestions ON TblAnswer.QuestionID = TblQuestions.QuestionID
GROUP BY TblVisit.VisitDate, TblQuestions.QuestionNumber, TblAnswer.Value,
TblQuestions.PassValue
ORDER BY TblQuestions.QuestionNumber;
Is this at all possible? I want to export the results of this new query to
excel. Any help would be greatly appreciated. Hope I have enclosed enough
information.
Thanks in advance for any advice given.
my problem; Frst I need to create a "count " query but have tried to figure
out which fields to add count. Second, I need to create a "Sum" query to
give me the answer to my question. The fields I need to include in my query
is Date, Question number, Answer value and Pass value.
Currently I get a result that looks like
VisitDate QuestionNumber Value PassValue
2/6/2005 001 1 1
5/2/2005 001 1 1
12/15/2005 001 1 1
12/30/2005 001 n/a 1
2/1/2006 001 1 1
2/3/2006 001 1 1
2/6/2005 002 1 1
5/2/2005 002 1 1
12/15/2005 002 1 1
12/30/2005 002 n/a 1
2/1/2006 002 1 1
2/3/2006 002 1 1
Etc...
What I'm trying to accomplish is a result that looks something like this;
Total of Question 1 Total of Value of Question 1 Total
Pass Value for Question 1
12 14
12
Etc...
Hope this make sense to someone :>/
I have inclosed my SQL for you to look at.
SELECT TblVisit.VisitDate, TblQuestions.QuestionNumber, TblAnswer.Value,
TblQuestions.PassValue
FROM (TblVisit RIGHT JOIN (TblAnswer RIGHT JOIN TblRecords ON TblAnswer.
AnswerID = TblRecords.AnswerID) ON TblVisit.VisitID = TblRecords.VisitID)
LEFT JOIN TblQuestions ON TblAnswer.QuestionID = TblQuestions.QuestionID
GROUP BY TblVisit.VisitDate, TblQuestions.QuestionNumber, TblAnswer.Value,
TblQuestions.PassValue
ORDER BY TblQuestions.QuestionNumber;
Is this at all possible? I want to export the results of this new query to
excel. Any help would be greatly appreciated. Hope I have enclosed enough
information.
Thanks in advance for any advice given.