J
jmersing
I have never used ADO for manipulating records, I would like to learn how to.
Assuming I have the following tables and fields:
tblEmp empnum, empname
tblShift StartTime Endtime
tblskill taskID,Status
tblPlan taskid, required_hours, required_time, priority
tbllRules (all boolean connected to a form) Active, Required, Prioitzie,
ApplySort etc.
The high level logic would be:
Insert the employee into a table if the task is active
and hours are required
and the employee is available during the required time
and the employee can perform the skill
and all of the rules (boolean attributes) have been met
Sort the recordset different priorities i.e. preference, seniority, priority
Keep adding until the required hours are met, then move to the next
task/employee
If someone could help me with skeleton of this procedure I think I can piece
the rest of it together. The part I'm most concerned with is the logic that
loops through all criteria and then inserts the records. I need to understand
how to use variables, and how to loop/edit records based on criteria.
I assume someone has tackled a project like this before, maybe someone could
provide some code with similar logic?
Thanks
Assuming I have the following tables and fields:
tblEmp empnum, empname
tblShift StartTime Endtime
tblskill taskID,Status
tblPlan taskid, required_hours, required_time, priority
tbllRules (all boolean connected to a form) Active, Required, Prioitzie,
ApplySort etc.
The high level logic would be:
Insert the employee into a table if the task is active
and hours are required
and the employee is available during the required time
and the employee can perform the skill
and all of the rules (boolean attributes) have been met
Sort the recordset different priorities i.e. preference, seniority, priority
Keep adding until the required hours are met, then move to the next
task/employee
If someone could help me with skeleton of this procedure I think I can piece
the rest of it together. The part I'm most concerned with is the logic that
loops through all criteria and then inserts the records. I need to understand
how to use variables, and how to loop/edit records based on criteria.
I assume someone has tackled a project like this before, maybe someone could
provide some code with similar logic?
Thanks