BlueCarpet
New member
- Local time
- Today, 20:37
- Joined
- Sep 1, 2003
- Messages
- 9
Hi, I originally posted this problem on the Tables forum but having read a little bit more about Access, I think that perhaps I am looking at some kind of Macro using the RecordSet functions.
"Suppose I have someone who writes an exam 10 times in one day. However, it is only the last result of that day I am interested in, not the preceding nine. When the information is entered into a spreadsheet, it will have the StudentID appearing 10 times, with the exam date with a result alongside each record. So I meant unique to the extent that each student is uniquely identified by their ID. However there could be 1000 students per day, each with differing amounts of times they have sat the exam. So, if I only want the first entry with that particular ID, can I ask Access to get rid of the next 9. Is there some way to "loop" through the data to search for each ID, then discard the rest or perhaps loop through and ask Access or Excel or whatever to take each time it first encounters a UniqueID to dump that record into another Table or spreadsheet"
Now, the problem is compounded by the fact that I also need to know the number of duplicates of each StudentID. So, an analogy is that I will need to count how many times each student has written that exam that day, as well as only ultimately being interested in the final result.
If if makes things easier, I can also structure the problem another way. What if I were to be interested in the average mark of the total number of times the student has taken the exam in that day rather than just the final result. That way, I think that it would be possible to keep all the relevant records in one table to be able to count the number of times the exam is taken, as well as then just doing an operation on it to get the average of one field per StudentID.
Any help would be greatly appreciated!
"Suppose I have someone who writes an exam 10 times in one day. However, it is only the last result of that day I am interested in, not the preceding nine. When the information is entered into a spreadsheet, it will have the StudentID appearing 10 times, with the exam date with a result alongside each record. So I meant unique to the extent that each student is uniquely identified by their ID. However there could be 1000 students per day, each with differing amounts of times they have sat the exam. So, if I only want the first entry with that particular ID, can I ask Access to get rid of the next 9. Is there some way to "loop" through the data to search for each ID, then discard the rest or perhaps loop through and ask Access or Excel or whatever to take each time it first encounters a UniqueID to dump that record into another Table or spreadsheet"
Now, the problem is compounded by the fact that I also need to know the number of duplicates of each StudentID. So, an analogy is that I will need to count how many times each student has written that exam that day, as well as only ultimately being interested in the final result.
If if makes things easier, I can also structure the problem another way. What if I were to be interested in the average mark of the total number of times the student has taken the exam in that day rather than just the final result. That way, I think that it would be possible to keep all the relevant records in one table to be able to count the number of times the exam is taken, as well as then just doing an operation on it to get the average of one field per StudentID.
Any help would be greatly appreciated!