Update new training start and due dates

Slakker99

New member
Local time
Today, 14:35
Joined
Oct 20, 2020
Messages
2
Hello,
I need some assistance on a DB I've created. I want to create a button that updates start and due dates per employee training, problem is I have created a button that updates all the training start and due dates to the date input in the form, and it updates the whole field instead of the specific employee and training dates. How do I make an update button for a specific employees' training dates?
 
use a criteria - something like

WHERE EmpPk =forms!myForm!EmpPk

but why not just use a bound form?
 
You need to create an update query using the date selected as criteria, and selecting just the fields you need to update. That way only the records that match the criteria will be updated
 
use a criteria - something like

WHERE EmpPk =forms!myForm!EmpPk

but why not just use a bound form?
That's an idea, I'm selecting data from two different tables ( employee and training select tables) that are adding/updating the training DB table. The form has drop down menus giving the selections from both tables and then date picker boxes. Would I use a bounded form for that or the Where criteria? How would I write out the Where criteria?
 
better to use a bound form, no code required.

without knowing the full background to your requirement suggest you need perhaps 3 tables

tblEmployees
empPK
empName

tblTrainingCourses
CoursePK
CourseName
CourseDate

tblEmployeeCourses

empCoursePK
empFK - links to empPK
CourseFK- links to coursePK

so your main form might be based on tblemployees with a continuous subform based on tblEmployeeCourses. This subform only needs to display a combobox based on tblTrainincCourses

Alternatively your main form might be based on tblTrainingCourses with a continuous subform based on tblEmployeeCourses. For this way the subform only needs to display a combobox based on tblEmployees
 

Users who are viewing this thread

Back
Top Bottom