Query criteria doesnt use year input
From: mate (anonymous_at_discussions.microsoft.com)
Date: 05/28/04
- Next message: Sandy: "Re: Insert contents of Col in one table into another table"
- Previous message: Steve Schapel: "Re: HELP with updateable query"
- In reply to: Donna Brooks: "Query criteria doesnt use year input"
- Next in thread: Ken Snell: "Re: Query criteria doesnt use year input"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 28 May 2004 13:00:21 -0700
First create a query that uses the datePart function to
extract the year and use 2004 in the criteria. Then use
your DateAdd query and base it on the datePart query. I
realize this is only a temporary fix as it will eventually
be 2005. but it should work for a little while at least.
>-----Original Message-----
>I have created a query in my HR database to pull all
>employees due for their 90 day evaluation. Fields are as
>follows: EmpNo
> LastName
> FirstName
> HireDate
> 90Days: DateAdd("d",90,[HireDate])
>I can run the query, calculates great. But, I need to
>pull all employees, for examples, that the 90 Day is due
>between 06/01/2004 and 06/30/2004, so in the criteria for
>this expression, I use:
> Between [Enter the first day of the month] and
>[Enter the last day of the month]
>It runs the query, but it pulls all employees with 90 Day
>due in June regardless of the year. I need it to only
>pull the ones with the year I specify. For example, I get
>results like this, if my criteria were between 06/01/2004
>and 06/30/2004.
>
>525 John Doe 03/05/04 06/05/04
>480 Jane Doe 03/08/01 06/08/01
>592 Joe Blo 03/11/02 06/11/02
>
>The only one that I need it to pull would be the first
>one, the one in 2004.
>
>Please help.
>Thanks,
>Donna Brooks
>
>
>.
>
- Next message: Sandy: "Re: Insert contents of Col in one table into another table"
- Previous message: Steve Schapel: "Re: HELP with updateable query"
- In reply to: Donna Brooks: "Query criteria doesnt use year input"
- Next in thread: Ken Snell: "Re: Query criteria doesnt use year input"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|