Qry Formula help

  • Thread starter Thread starter Chad
  • Start date Start date
C

Chad

Hello, in my query I have two fields and an expression.
1) EmployeeName
2) PeriodRatedTo
3) Expression= DueDate: DateAdd("d",-30,[PeriodRatedTo]) and a Criteria:
Date()

What I want the query to do is show the EmployeesName and the PeriodRatedTo
date but I want it to show only 30 days prior to the PeriodRatedTo date. I
keep getting no results... Is my formula wrong? thanks!
 
Hello, in my query I have two fields and an expression.
1) EmployeeName
2) PeriodRatedTo
3) Expression= DueDate: DateAdd("d",-30,[PeriodRatedTo]) and a Criteria:
Date()

What I want the query to do is show the EmployeesName and the PeriodRatedTo
date but I want it to show only 30 days prior to the PeriodRatedTo date. I
keep getting no results... Is my formula wrong? thanks!

Your formula will show only those records where today's date is exactly equal
to the date thirty days prior to PeriodRatedTo. If that date is yesterday or
tomorrow, you'll see nothing.

You can remove the expression DueDate altogether, and instead use a criterion
on PeriodRatedTo of

BETWEEN Date() AND DateAdd("d", 30, Date())

to see all PeriodRatedTo values coming up in the next thirty days.

John W. Vinson [MVP]
 
Im using it in a reminder pop up so how would I stop the reminder after the
PeriodRated to so it doesnt continue poping up? I found a example that using
a check box in the pop up for the record canceled it but I also want to stop
it as well in the query if possible..Thnaks!
--
Newbies need extra loven.........


John W. Vinson said:
Hello, in my query I have two fields and an expression.
1) EmployeeName
2) PeriodRatedTo
3) Expression= DueDate: DateAdd("d",-30,[PeriodRatedTo]) and a Criteria:
Date()

What I want the query to do is show the EmployeesName and the PeriodRatedTo
date but I want it to show only 30 days prior to the PeriodRatedTo date. I
keep getting no results... Is my formula wrong? thanks!

Your formula will show only those records where today's date is exactly equal
to the date thirty days prior to PeriodRatedTo. If that date is yesterday or
tomorrow, you'll see nothing.

You can remove the expression DueDate altogether, and instead use a criterion
on PeriodRatedTo of

BETWEEN Date() AND DateAdd("d", 30, Date())

to see all PeriodRatedTo values coming up in the next thirty days.

John W. Vinson [MVP]
 
Back
Top