Re: Query To Find Records As Of Specified Date

From: Sue (smillin_at_notmyemail.com)
Date: 10/29/04


Date: Fri, 29 Oct 2004 01:35:38 GMT

Thank you for the quick response!

I'm confused by your response. DateHired will never be greater than
DateLaidOff. Also, an employee who was just hired will not have a
DateLaidOff.

Sue

"deko" <www-dot-clearpointsystems-dot-com@nospam.com> wrote in message
news:mNggd.36303$QJ3.8238@newssvr21.news.prodigy.com...
> > TblEmployee
> > EmployeeID
> > FirstName
> > LastName
> >
> > TblEmployment
> > EmploymentID
> > EmployeeID
> > DateHired
> > DateLaidOff
> >
> > Any employee may have several records in TblEmployment. At the end of
each
> > month a report is needed showing all the employees on the payroll on the
> > last day of the month. I need help creating the query for that report.
The
> > user must be able to specify the month and year for the report; ie, not
> just
> > the current or previous month but any year and month in the past. The
> query
> > must take into account that the user might specify a month in the
previous
> > year and that an employee might have been hired and laid off several
times
> > after that month.
>
> I assume you have a form where the date (e.g. 10/31/2004 = "userDate")
will
> be entered by the user for running each report. If so, it sounds like you
> need to select distinct records from tblEmployment where DateHired is >
> DateLaidOff and DateHired is < userDate, and then join to tblEmployee on
> EmployeeID. Does this make sense?
>
>



Relevant Pages