A
Amy Blankenship
I am using the following query as the data source for a form
SELECT Page.PageID, Page.ParentID, Page.QuestionID AS Page_QuestionID,
Page.PageOrder, Question.QuestionID AS Question_QuestionID,
Question.QuestionTypeID, Question.DistCorrect, Question.SubCatMajor,
Question.SubCatMinor, Question.QtypeID, Question.Difficulty,
DCount("*","frmDCountLineNums","PageOrder<=" & [Page].[Pageorder] & " AND
ParentID = " & [Page].[ParentID] & " AND SubCatMajor >0") AS QuestionNum,
getDistractorCodes([question].[QuestionID]) AS DistractorCodes,
Page.ParentLevelID
FROM Question RIGHT JOIN Page ON Question.QuestionID = Page.QuestionID;
Essentially, there are pages that aren't of interest to the "line number"
that the form needs to display on the screen, so I am using DCount of the
query frmDCountLineNums instead of PageOrder to allow the user to see which
page (with an actual scored question on it) is considered Question 1,
Question 2, etc. When I run the query by itself, everything works
perfectly. When I launch the form based on the query, every QuestionNum
contains #Error, rather than the expected question number.
Does any one know why this would be or how I can get at the actual error
that is occurring for troubleshooting?
TIA;
Amy
SELECT Page.PageID, Page.ParentID, Page.QuestionID AS Page_QuestionID,
Page.PageOrder, Question.QuestionID AS Question_QuestionID,
Question.QuestionTypeID, Question.DistCorrect, Question.SubCatMajor,
Question.SubCatMinor, Question.QtypeID, Question.Difficulty,
DCount("*","frmDCountLineNums","PageOrder<=" & [Page].[Pageorder] & " AND
ParentID = " & [Page].[ParentID] & " AND SubCatMajor >0") AS QuestionNum,
getDistractorCodes([question].[QuestionID]) AS DistractorCodes,
Page.ParentLevelID
FROM Question RIGHT JOIN Page ON Question.QuestionID = Page.QuestionID;
Essentially, there are pages that aren't of interest to the "line number"
that the form needs to display on the screen, so I am using DCount of the
query frmDCountLineNums instead of PageOrder to allow the user to see which
page (with an actual scored question on it) is considered Question 1,
Question 2, etc. When I run the query by itself, everything works
perfectly. When I launch the form based on the query, every QuestionNum
contains #Error, rather than the expected question number.
Does any one know why this would be or how I can get at the actual error
that is occurring for troubleshooting?
TIA;
Amy