Skip Bisconer
Who Me?
- Local time
- Today, 14:22
- Joined
- Jan 22, 2008
- Messages
- 285
I have two tables TrainingPolicies and TrainingLog. Each policy has an invertal of 1, 3, or 0 indicating years to establish a retrain date in the TrainingLog.
We occasionally have to change the interval and need to update the Trainglog with the interval and change the retrain date to match.
Both tables data type are the same for Interval (Number) and Date (m/d/yyyy) but when I try to run an iff statement I used with a form to calculate the retrain date I get a Data Type mismatch and I am assuming its the date criteria.
If someone can tell from my SQL what my real problem is it would help. Thanks for looking at my request. Any suggestions would be greatly appreciated. Below is my SQL:
UPDATE tblTrainingLog INNER JOIN tblTrainingPolicies ON tblTrainingLog.CWSPolicy = tblTrainingPolicies.CWSPolicy SET tblTrainingLog.Intv = tblTrainingPolicies.Intv, tblTrainingLog.RetrainDate = IIf(Nz("Intv",0)=0,Null,DateAdd('yyyy',"Intv","DateTrained")) the last "DateTrained" doesn't have a space it just seems like in this posting and when I try to change it there isn't a space there.
We occasionally have to change the interval and need to update the Trainglog with the interval and change the retrain date to match.
Both tables data type are the same for Interval (Number) and Date (m/d/yyyy) but when I try to run an iff statement I used with a form to calculate the retrain date I get a Data Type mismatch and I am assuming its the date criteria.
If someone can tell from my SQL what my real problem is it would help. Thanks for looking at my request. Any suggestions would be greatly appreciated. Below is my SQL:
UPDATE tblTrainingLog INNER JOIN tblTrainingPolicies ON tblTrainingLog.CWSPolicy = tblTrainingPolicies.CWSPolicy SET tblTrainingLog.Intv = tblTrainingPolicies.Intv, tblTrainingLog.RetrainDate = IIf(Nz("Intv",0)=0,Null,DateAdd('yyyy',"Intv","DateTrained")) the last "DateTrained" doesn't have a space it just seems like in this posting and when I try to change it there isn't a space there.
Last edited: