help with 2 queries to compare and delete from same source table

E

efandango

(This may sound complicated, please bear with me...)

I have a quiz results form that shows the number of times each incorrect
answer has been submitted via a query.

The query gets 'incorrect score results' from a table called
'tbl_Final_Points_Test'. It uses the unique ID for each answer as a COUNT
total which gives me the total number of times each Incorrect answer has been
chosen, and it uses the criteria '0' for displaying only incorrect answers.

The Problem
This all works fine, except as time goes by, the number of each total
incorrect entry increases (as it is designed to), but what I want to do is
have the incorrect totals decrease as the user begins to get the same
(repeat) question right. This way the user can see that he is beggining to
improve his overall progress.

No matter what I try I just can't get my head around how the queries and
table should interact, if anyone has the time to help, I would be most
grateful.

I Have tried to run a near identical query, but using '-1' (for correct
answers), and trying to use that as a delete query against the underlying
table, but have run into a few problems:

I only want to delete one of each 'wrong' record entry (there can be many
identical historic wrong answers)

The query say's 'Could not delete from specified tables'


The query for the wrong answers is: QX_Score_Points_split_Wrong
The query for the wrong answers is: QX_Score_Points_split_Correct

(the query for the 'Correct' answers is the same, and has the same sourse
table but uses a -1 criteria for tempscore

This is the 'Wrong answers query'

SELECT Tbl_Scores_Running_Totals.Run_No,
Tbl_Scores_Running_Totals.Run_point_Venue,
Tbl_Scores_Running_Totals.Run_point_Address,

Count(Tbl_Scores_Running_Totals.Point_Quiz_ID) AS x_Wrong

FROM Tbl_Scores_Running_Totals

GROUP BY Tbl_Scores_Running_Totals.Run_No,
Tbl_Scores_Running_Totals.answer_box,
Tbl_Scores_Running_Totals.Run_point_Venue,
Tbl_Scores_Running_Totals.Run_point_Address,
Tbl_Scores_Running_Totals.Tempscore

HAVING (((Tbl_Scores_Running_Totals.Tempscore)=0))

ORDER BY Count(Tbl_Scores_Running_Totals.Point_Quiz_ID) DESC;


The table is:
tbl_Final_Points_Test
 

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