Stangleboy
Programmer
Alright this is going to be a little difficult and I do not know where to start and what forums to use (VBA, Access Forms or SQL) but I believe the answer lies in VBA coding so I am posting on this forum. I have an Access database with a SQL back-end for training function. I had the system working in perfect Business logic but the customer wants to shift away from logic.
I have a form called course and a sub-form that list the employees taking the course, to stop duplicate employees from being entered I made the employee number, course number and no show fields in a transition table- unique in the SQL table, perfect logic. The issue is that, there are multiple ways to get employees enrolled into the a course (InfoPath, e-mail, using the Access form, etc.), staff (aka- bosses and big wigs) did not want to waste time addressing the errors of duplicate employee from being entered, since they can add staff via building, or classification or hire date in groups and 1 or 2 employees (that were already enrolled be other means) could cause the duplication error.
So the solution I see is that the bosses and big wigs can enter in the staff as they see fit without getting duplication errors and then the training staff will click a “button” control on the course form and VBA code would run to delete the duplicates or triplicate (so on) on the course to close enrollment. Is there anyone that knows VBA code that will search the sub-form for duplicates/triplicates (leaving one record) and delete the rest?
Please help, the idea sounds good just need to implement, thank you all for your time in advance.
I have a form called course and a sub-form that list the employees taking the course, to stop duplicate employees from being entered I made the employee number, course number and no show fields in a transition table- unique in the SQL table, perfect logic. The issue is that, there are multiple ways to get employees enrolled into the a course (InfoPath, e-mail, using the Access form, etc.), staff (aka- bosses and big wigs) did not want to waste time addressing the errors of duplicate employee from being entered, since they can add staff via building, or classification or hire date in groups and 1 or 2 employees (that were already enrolled be other means) could cause the duplication error.
So the solution I see is that the bosses and big wigs can enter in the staff as they see fit without getting duplication errors and then the training staff will click a “button” control on the course form and VBA code would run to delete the duplicates or triplicate (so on) on the course to close enrollment. Is there anyone that knows VBA code that will search the sub-form for duplicates/triplicates (leaving one record) and delete the rest?
Please help, the idea sounds good just need to implement, thank you all for your time in advance.