G
Guest
I have a form called "Training" which is a form and a subform. It allows
someone to select the employee then enter the training, date taken, and
expiration date. The training field is a combo box which pulls from a table
called "tblTraininList"
I did have a function in the control on the DateExpires field, but since
some trainings or things we track don't have a set expiration date, such as
car insurance, that didn't work since it wouldn't let someone overwrite it
since it was bound to a code. I got a suggestion to bind the DateExpires
field to my training table and just add a column to my tblTrainingList with
the number of years each training is good for. This would allow for easy
edits if a new training was added. Here is what they told me to put, but I
coudln't get it to work
I was to put this code in the AfterUpdate events of the Training field and
DateTaken field
If Training.Column(2)>0 Then DateExpires =DateAdd
("yyyy",TrainingColumn(2),DateTaken)
I did that but it didn't do anything. My row source for the Training field
is this:
SELECT tblTrainingList.Training, tblTrainingList.Description,
tblTrainingList.NumberofYears
FROM tblTrainingList;
Is there something wrong here?
someone to select the employee then enter the training, date taken, and
expiration date. The training field is a combo box which pulls from a table
called "tblTraininList"
I did have a function in the control on the DateExpires field, but since
some trainings or things we track don't have a set expiration date, such as
car insurance, that didn't work since it wouldn't let someone overwrite it
since it was bound to a code. I got a suggestion to bind the DateExpires
field to my training table and just add a column to my tblTrainingList with
the number of years each training is good for. This would allow for easy
edits if a new training was added. Here is what they told me to put, but I
coudln't get it to work
I was to put this code in the AfterUpdate events of the Training field and
DateTaken field
If Training.Column(2)>0 Then DateExpires =DateAdd
("yyyy",TrainingColumn(2),DateTaken)
I did that but it didn't do anything. My row source for the Training field
is this:
SELECT tblTrainingList.Training, tblTrainingList.Description,
tblTrainingList.NumberofYears
FROM tblTrainingList;
Is there something wrong here?