All,
I have run into another challenge. I have a list of training courses that have been completed. Some of these courses must be retaken every year. Although the actual listing of the completed courses would naturally appear as entered (chronologically), I used a query to simply sort by the course, employee, and date (descending date so the most recently completed training is at the top). I am interested in how I can include scripting and/or add a query to remove/ignore/overlook these unneeded out-of-date trainings - I only need for the most recent training 'by training course' and 'by employee' to appear. On the attached screenshot is an example of what I am trying to overcome - the highlighted row is the course that I do NOT need to examine. Please note that manually removing the older courses from the list when newer courses are completed is undesirable as the intent is to capture all training activity - from start to finish... plus, removing older courses when the course is retaken would take too much time.
I have tried several methods such as using nested 'For Each' statements and comparing one record of the recordset to the recordset immediately below it. In theory, this should work but I was unable to use two variables in an 'If' statement (i.e., if [$variable_x] = [$variable_y]....). I did try to do this using VBScript but I got strange and inconsistent results. I also tried to add scripting that will performed immediately after the sorting query was run (the intent was to put a mark in a checkbox denoting that where outdated training had been superseded by new training for the same course for the same person but, this too, did not work.
Does anyone have an idea for method that would allow the program to ignore the older courses when the same person has completed the same course more recently? In the example screenshot, only one course meets the criteria that I am trying to eliminate but in actual practice it could be many - for example, courses that must be repeated four times a year. In summary, I need to capture the most recent time each training course was completed by each employee.
Thanks,
Daryl G
I have run into another challenge. I have a list of training courses that have been completed. Some of these courses must be retaken every year. Although the actual listing of the completed courses would naturally appear as entered (chronologically), I used a query to simply sort by the course, employee, and date (descending date so the most recently completed training is at the top). I am interested in how I can include scripting and/or add a query to remove/ignore/overlook these unneeded out-of-date trainings - I only need for the most recent training 'by training course' and 'by employee' to appear. On the attached screenshot is an example of what I am trying to overcome - the highlighted row is the course that I do NOT need to examine. Please note that manually removing the older courses from the list when newer courses are completed is undesirable as the intent is to capture all training activity - from start to finish... plus, removing older courses when the course is retaken would take too much time.
I have tried several methods such as using nested 'For Each' statements and comparing one record of the recordset to the recordset immediately below it. In theory, this should work but I was unable to use two variables in an 'If' statement (i.e., if [$variable_x] = [$variable_y]....). I did try to do this using VBScript but I got strange and inconsistent results. I also tried to add scripting that will performed immediately after the sorting query was run (the intent was to put a mark in a checkbox denoting that where outdated training had been superseded by new training for the same course for the same person but, this too, did not work.
Does anyone have an idea for method that would allow the program to ignore the older courses when the same person has completed the same course more recently? In the example screenshot, only one course meets the criteria that I am trying to eliminate but in actual practice it could be many - for example, courses that must be repeated four times a year. In summary, I need to capture the most recent time each training course was completed by each employee.
Thanks,
Daryl G