Solved Need some help trying to figure out automatic data entry (1 Viewer)

dawsonrhodes

Member
Local time
Today, 14:39
Joined
Mar 8, 2020
Messages
85
Hello all,

I have been building an employee database, it has gone amazingly, just ran into something I wouldn't know how to sort out.

Basically, when we have a new training requirement come out we need to track completion. The way I currently do that is adding it in through the "Add New Training" form that I have attached as a png. But that then requires me to go into each person "profile" and create a new training log for each person and then mark it as completed.

What I am trying to do now is make it so that when I add a new training module I can select a box that will automatically make an entry in the query for each "person/id" that I can later go and just edit rather than having to manually add it with drop downs.

Thanks all!
 

Attachments

  • Add New Training.PNG
    Add New Training.PNG
    23.8 KB · Views: 398
  • Training Viewer.PNG
    Training Viewer.PNG
    26.7 KB · Views: 393

Gasman

Enthusiastic Amateur
Local time
Today, 19:39
Joined
Sep 21, 2011
Messages
14,231
Have a form to select a certain course and records for each employee with a checkbox for each employee and tick those that need to take the course. Then process that recordset and create the relevant records.?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 02:39
Joined
May 7, 2009
Messages
19,231
add code to the Form's Before Update event to add the training to Each employee:

private sub form_beforeupdate(cancel as integer)
If Me.NewRecord Then
currentdb.execute "insert into emp_training_table (course_id, emp_id) " & _
"select " & Me.course_id & ", employee.emp_id from employee_table;"
end if
end sub
 

dawsonrhodes

Member
Local time
Today, 14:39
Joined
Mar 8, 2020
Messages
85
add code to the Form's Before Update event to add the training to Each employee:

private sub form_beforeupdate(cancel as integer)
If Me.NewRecord Then
currentdb.execute "insert into emp_training_table (course_id, emp_id) " & _
"select " & Me.course_id & ", employee.emp_id from employee_table;"
end if
end sub


Not sure how to write that for mine. Here is the layout of my database

tblEmployees (master for all employee data)
  • ID (autonumber)
  • EmployeeID (the number I designate them)
  • Name and so on
tblEmployeeTraining
  • TrainingID
  • Employee (so their auto ID in the tblEmployees table)
  • NameofTraining
  • Category
  • and so on
 

Users who are viewing this thread

Top Bottom