Set rs = db.OpenRecordset("tbl_employees")ĭoCmd.RunSQL "DELETE * FROM tbl_employee_work_assignments"īased on the very limited information provided and making a few assumptions, I would hazard a guess that your code should be changed to something along the lines of the following: Private Sub btn_build_assignment_schedule_Click()ĭoCmd.RunSQL "DELETE FROM tbl_employee_work_assignments"Ĭase "1": db.Execute "qry_append_schedule_1"Ĭase "2": db.Execute "qry_append_schedule_2"Ĭase "3": db.Execute "qry_append_schedule_3"Ĭase "4": db.Execute "qry_append_schedule_4" Many Thanks!!! Private Sub btn_build_assignment_schedule_Click() Again, the intent is that the code will look at each employees, one at a time, and append the correct assignments to tbl_employee_work_assignments based on each employees status and schedule version.Ĭan someone help me understand how to do this correctly, please? The issue that I am encountering is that this only reads the first employee in the table and gives every other employee the work assignments that the first employee should have. Then if the employee is in a work status the db will list their work assignments for each day. The intent is that this will loop through each employee in the company and if they are in a work status it will also read their assigned schedule version. Below is the code that I am using to create the actual daily work assignments. I am building a database that will be used for scheduling employee work assignments.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |