Re: Query To Find Records As Of Specified Date
From: Allen Browne (AllenBrowne_at_SeeSig.Invalid)
Date: Fri, 29 Oct 2004 09:16:24 +0800
1. Create a query using both tables.
2. In the Field row, enter:
[Last Day Of Month]
3. In the Criteria row under this field, enter:
Between [tblEmployment].[DateHired] And
4. Choose Parameters on the Query menu. In the dialog enter:
[Last Day Of Month] Date/Time
When you run the query, the user must enter a date such as 7/31/2004. The
query returns only those who were hired as of that date.
You should not get duplicates unless the person has two overlapping
-- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Sue" <firstname.lastname@example.org> wrote in message news:email@example.com... > I'm working on a database that keeps track of employees hired by a general > contractor on a project by project basis. These employees are hired to > work > on a project and are then laid off either at the end of the work they were > hired to do or at the end of the project. Any employee may be hired, laid > off and rehired several times during the course of time. The tables I have > and the critical fields to my question are: > 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. > > Thanks for all help! > > Sue