Hello,
I'm trying to write a query that does a few things. They are:
1. Holds two calculated fields. One calculates the 15th day from the effective date and the other calculates the 21st day after the effective date.
2. Displays records that fill in the following criteria:
A. LifeForm = Pending or Health Form = Pending or Dental Form = pending
When I remove the items under #2 the query runs just fine. For some reason I get the error when I had the items from Option A. I've attached a screenshot of the designer as well as the SQL code. Any help I can get would be greatly appreciated! :0)
SELECT Hires.FirstName, Hires.LastName, Hires.EffectiveDate, DateSerial(Year([EffectiveDate]),Month([EffectiveDate]),Day([EffectiveDate])+15) AS [15 Day Reminder], DateSerial(Year([EffectiveDate]),Month([EffectiveDate]),Day([EffectiveDate])+21) AS [21 Day Reminder], HireBenefits.LifeForm, HireBenefits.HealthForm, HireBenefits.DentalForm
FROM Hires INNER JOIN HireBenefits ON Hires.HiresID = HireBenefits.HiresID
WHERE (((HireBenefits.LifeForm)="pending")) OR (((HireBenefits.HealthForm)="pending")) OR (((HireBenefits.DentalForm)="pending"));
I'm trying to write a query that does a few things. They are:
1. Holds two calculated fields. One calculates the 15th day from the effective date and the other calculates the 21st day after the effective date.
2. Displays records that fill in the following criteria:
A. LifeForm = Pending or Health Form = Pending or Dental Form = pending
When I remove the items under #2 the query runs just fine. For some reason I get the error when I had the items from Option A. I've attached a screenshot of the designer as well as the SQL code. Any help I can get would be greatly appreciated! :0)
SELECT Hires.FirstName, Hires.LastName, Hires.EffectiveDate, DateSerial(Year([EffectiveDate]),Month([EffectiveDate]),Day([EffectiveDate])+15) AS [15 Day Reminder], DateSerial(Year([EffectiveDate]),Month([EffectiveDate]),Day([EffectiveDate])+21) AS [21 Day Reminder], HireBenefits.LifeForm, HireBenefits.HealthForm, HireBenefits.DentalForm
FROM Hires INNER JOIN HireBenefits ON Hires.HiresID = HireBenefits.HiresID
WHERE (((HireBenefits.LifeForm)="pending")) OR (((HireBenefits.HealthForm)="pending")) OR (((HireBenefits.DentalForm)="pending"));