I'm new to this forum and wanted to thank all of the contributors for the help they've indirectly given me over the past several months.
I'll provide the basic over view of the structure first:
I have three tables user, question, result
user - uid, name, join_date, complete_date
question - qid, question, dept
result - uid, qid, initial_answer, goal, final_answer
I'm trying to run a report to determine how well a group of users did for a specific time frame, i.e. month, quarter, and year.
What I'm hoping to produce is a report that prompts for start date and end date, no problem there, and then provides the results by "question" the percent that met their goal, exceeded their goal or did not meet their goal.
I have been juggling around a ton of queries one to get a list of all the questions/results for a time frame, then one to count the questions, and queries to compare each expression.
I worked out some psuedo code but have no idea how to implement it into the actual report. I've been flipping through several books that were left in my office and searching the web but I think my lack of knowledge is limiting my search criteria.
Here is the code that I thought would do it based upon my query that gets me the result information, the question (from the question table) and the complete date (from the user table) and i'll call it PercentResultsByDate
while PercentResultsByDate
for each question id
counter++
if final answer > goal
exceeds++
if final answer = goal
meets++
if final answer < goal
failstomeet++
questionid.meets = meets
questionid.exceeds = exceeds
questionid.fails = failstomeet
My problem is not knowing how to use the vb code feature well enough to access the query manipulate it and pass back values to the report. Is it possible to do this with queries somehow? I'm open to reading and scouring if i could be pointed in the right direction.
I'll provide the basic over view of the structure first:
I have three tables user, question, result
user - uid, name, join_date, complete_date
question - qid, question, dept
result - uid, qid, initial_answer, goal, final_answer
I'm trying to run a report to determine how well a group of users did for a specific time frame, i.e. month, quarter, and year.
What I'm hoping to produce is a report that prompts for start date and end date, no problem there, and then provides the results by "question" the percent that met their goal, exceeded their goal or did not meet their goal.
I have been juggling around a ton of queries one to get a list of all the questions/results for a time frame, then one to count the questions, and queries to compare each expression.
I worked out some psuedo code but have no idea how to implement it into the actual report. I've been flipping through several books that were left in my office and searching the web but I think my lack of knowledge is limiting my search criteria.
Here is the code that I thought would do it based upon my query that gets me the result information, the question (from the question table) and the complete date (from the user table) and i'll call it PercentResultsByDate
while PercentResultsByDate
for each question id
counter++
if final answer > goal
exceeds++
if final answer = goal
meets++
if final answer < goal
failstomeet++
questionid.meets = meets
questionid.exceeds = exceeds
questionid.fails = failstomeet
My problem is not knowing how to use the vb code feature well enough to access the query manipulate it and pass back values to the report. Is it possible to do this with queries somehow? I'm open to reading and scouring if i could be pointed in the right direction.