T
tlyczko
I get NO error messages about this query from Access 2003.
SELECT tblQuestions.ProgramID, tblQuestions.intTopicSortOrder,
tblQuestions.txtTopic, tblQuestions.intQuestionSortOrder,
tblQuestions.txtQuestion, tblResponses.txtResponse,
tblResponses.AuditID, tblResponses.ResponseID
FROM tblQuestions INNER JOIN tblResponses ON tblQuestions.QuestionID =
tblResponses.QuestionID
GROUP BY tblQuestions.ProgramID, tblQuestions.intTopicSortOrder,
tblQuestions.txtTopic, tblQuestions.intQuestionSortOrder,
tblQuestions.txtQuestion, tblResponses.txtResponse,
tblResponses.AuditID, tblResponses.ResponseID
ORDER BY tblQuestions.intTopicSortOrder,
tblQuestions.intQuestionSortOrder;
I have tried including both DISTINCT and DISTINCTROW and changing the
join properties, right join is wrong, pulls too many records, left join
doesn't make it updateable either. Removing the join doesn't work
either.
Basic idea is to show the questions and topics that go with the
QuestionID in tblResponses.
tblResponses:
ResponseID PK
AuditID FK
AuditInformationID FK
QuestionID FK (this is not defined in the Relationships window, it is
there to show what question's been asked for response)
txtResponse -- the field I want to update to answer the question after
the query is run
tblQuestions:
QuestionID PK
Topic
intTopicSortOrder
intQuestionSortOrder
txtQuestion -- text of the question for people to see
ProgramID
some other fields not used in this query
Do I need to rearrange the fields in the QBE grid?? I've tried this
with some fields and got nowhere.
Thank you, Tom
SELECT tblQuestions.ProgramID, tblQuestions.intTopicSortOrder,
tblQuestions.txtTopic, tblQuestions.intQuestionSortOrder,
tblQuestions.txtQuestion, tblResponses.txtResponse,
tblResponses.AuditID, tblResponses.ResponseID
FROM tblQuestions INNER JOIN tblResponses ON tblQuestions.QuestionID =
tblResponses.QuestionID
GROUP BY tblQuestions.ProgramID, tblQuestions.intTopicSortOrder,
tblQuestions.txtTopic, tblQuestions.intQuestionSortOrder,
tblQuestions.txtQuestion, tblResponses.txtResponse,
tblResponses.AuditID, tblResponses.ResponseID
ORDER BY tblQuestions.intTopicSortOrder,
tblQuestions.intQuestionSortOrder;
I have tried including both DISTINCT and DISTINCTROW and changing the
join properties, right join is wrong, pulls too many records, left join
doesn't make it updateable either. Removing the join doesn't work
either.
Basic idea is to show the questions and topics that go with the
QuestionID in tblResponses.
tblResponses:
ResponseID PK
AuditID FK
AuditInformationID FK
QuestionID FK (this is not defined in the Relationships window, it is
there to show what question's been asked for response)
txtResponse -- the field I want to update to answer the question after
the query is run
tblQuestions:
QuestionID PK
Topic
intTopicSortOrder
intQuestionSortOrder
txtQuestion -- text of the question for people to see
ProgramID
some other fields not used in this query
Do I need to rearrange the fields in the QBE grid?? I've tried this
with some fields and got nowhere.
Thank you, Tom