Design by Sue
Registered User.
- Local time
- Today, 00:54
- Joined
- Jul 16, 2010
- Messages
- 816
I have a form with a sub form that is used to enter information about job training. The main form is used to enter info into the training table that includes fields for the training number, type, description, expiration, if it is obsolete and if it is mandatory. The subform is linked to the job description training table that has fields for the training number - from the main form - and the job descriptions that require that training. There can bee mulitple records for one training number as different job descriptions may require that training. On the main form there is a check box (yes/no field) that the user checks to indicate that the job training is mandatory. If the training is manditory it means all job descriptions require that training.
On the subform there is an unbound combo box with a row source is a query that displays all of the job descriptions. This alllows the user to select one of job descrptions and then click a button to addt job description to the job description training table. This updates the job description training table to add training number from the main form and the selected job description on the subform.
So I would like to create a new button that would instead create a record for each of the job descriptions in the database with the training number from the main form (just as the current button does but for all of the descriptions). Here is a modified verison of the code I am using to add one of the job descriptions currently (these are not actually the names in the database but hopefully changed to make it more understandable.)
"INSERT INTO [JobDescriptionTrainingTbl] ([TraiiningName],[JobDescription]) VALUES ('" & ESC(Parent.TrainingNumber) & "', '" & ESC([JobDescriptiom]) & "’)"
Ideally I would like this update to be done automatically when the mandatory selection is made on the main form (and if mandatory is deselected remove all job descriptions) BUT this is above my abilities so I can work with buttons on the sub form that adds all job descriptions or removes all job descriptions.
I hope that makes sense and is enough info for someone to help me get this working. Thanks in advance for any assistance
Sue
On the subform there is an unbound combo box with a row source is a query that displays all of the job descriptions. This alllows the user to select one of job descrptions and then click a button to addt job description to the job description training table. This updates the job description training table to add training number from the main form and the selected job description on the subform.
So I would like to create a new button that would instead create a record for each of the job descriptions in the database with the training number from the main form (just as the current button does but for all of the descriptions). Here is a modified verison of the code I am using to add one of the job descriptions currently (these are not actually the names in the database but hopefully changed to make it more understandable.)
"INSERT INTO [JobDescriptionTrainingTbl] ([TraiiningName],[JobDescription]) VALUES ('" & ESC(Parent.TrainingNumber) & "', '" & ESC([JobDescriptiom]) & "’)"
Ideally I would like this update to be done automatically when the mandatory selection is made on the main form (and if mandatory is deselected remove all job descriptions) BUT this is above my abilities so I can work with buttons on the sub form that adds all job descriptions or removes all job descriptions.
I hope that makes sense and is enough info for someone to help me get this working. Thanks in advance for any assistance
Sue