JimmyHoffa
New member
- Local time
- Yesterday, 20:53
- Joined
- Dec 11, 2018
- Messages
- 2
Good evening,
I have a form with the record source set to tblEmployeeTraining.
In tblEmployeeTraining, I have the following fields:
ID (primary key)
EmployeeID_fk
TrainingID_fk
TrainingDate (date)
TrainingScan (attachment)
I have a table with a list of trainings, named List_Trainings. In this table, I have the following fields:
ID (pk)
TrainingDescription
TrainingExpiryNumber
TrainingExpiryInterval
TrainingCanExpire (yes/no)
In my form, I want text to automatically appear for it to say either "Valid", "Expired" or "Not Applicable" next to the training description combo box.
The way I tried to do it was to add three text boxes one on top of another. I've used the following control source expression builder for each of the text boxes:
All I get is #Name? as a result. I may be way off in what I'm trying to do and I'm looking for your help!
Thanks
I have a form with the record source set to tblEmployeeTraining.
In tblEmployeeTraining, I have the following fields:
ID (primary key)
EmployeeID_fk
TrainingID_fk
TrainingDate (date)
TrainingScan (attachment)
I have a table with a list of trainings, named List_Trainings. In this table, I have the following fields:
ID (pk)
TrainingDescription
TrainingExpiryNumber
TrainingExpiryInterval
TrainingCanExpire (yes/no)
In my form, I want text to automatically appear for it to say either "Valid", "Expired" or "Not Applicable" next to the training description combo box.
The way I tried to do it was to add three text boxes one on top of another. I've used the following control source expression builder for each of the text boxes:
Code:
=IIf(([List_Trainings]![TrainingCanExpire] = -1) and (Now()<DateAdd("m",[List_Trainings]![TrainingExpiryNumber],[tblEmployeeTraining]![TrainingDate])),"Valid (" & DateAdd("m",[List_Trainings]![TrainingExpiryNumber],[tblEmployeeTraining]![TrainingDate]) & ")","")
Code:
=IIf(([List_Trainings]![TrainingCanExpire] = -1) and (Now()>DateAdd("m",[List_Trainings]![TrainingExpiryNumber],[tblEmployeeTraining]![TrainingDate])),"Expired (" & DateAdd("m",[List_Trainings]![TrainingExpiryNumber],[tblEmployeeTraining]![TrainingDate]) & ")","")
Code:
=IIf([List_Trainings]![TrainingCanExpire] = 0,"Not Applicable","")
All I get is #Name? as a result. I may be way off in what I'm trying to do and I'm looking for your help!
Thanks