bwyrwitzke
Registered User.
- Local time
- Today, 14:22
- Joined
- Nov 11, 2002
- Messages
- 50
Hi All,
Hopefully you all can knock some sense into me on this one. I'm creating a dynamic query with a calculated date function that only works part of the time.
This works:
This returns a Data Type Mismatch in Criteria Expression:
The only difference is the additional criteria (and brackets & parenthesis) that gets added. Why does one work and the other not??? Thanks in advance.
Bruce
Hopefully you all can knock some sense into me on this one. I'm creating a dynamic query with a calculated date function that only works part of the time.
This works:
Code:
SELECT s.*, DateDiff("d",s.DSP_Trained_Date,date()) AS Expr1
FROM tblPersonnel AS s
WHERE (DateDiff("d",s.DSP_Trained_Date,date()))<365 AND s.View =True AND s.Contractor1=True
ORDER BY s.[Last Name], s.[First Name], s.Organization;
This returns a Data Type Mismatch in Criteria Expression:
Code:
SELECT s.*, DateDiff("d",s.DSP_Trained_Date,Date()) AS Expr1
FROM tblPersonnel AS s
WHERE (((DateDiff("d",[s].[DSP_Trained_Date],Date()))<365) AND ((s.View)=True))
ORDER BY s.[Last Name], s.[First Name], s.Organization;
The only difference is the additional criteria (and brackets & parenthesis) that gets added. Why does one work and the other not??? Thanks in advance.
Bruce