R
Regan via AccessMonster.com
hi i have a query that gets fields from different tables. one of the tables
is tblPaychanges. where if and employee gets pay changes it is recorded. it
records the date of the change and the change itself.
Now in the query io want to have a column [PayRate].
how do i make a query so that the payRate before a certain date is 100 but
not after that date
Table Paychanges
PayID EmployeeID PayDateChange Rate
1 8 31/05/06 15
2 8 11/07/06 20
3 9 18/07/06 21
i want it so in the Rate column in my query for EMployee 8 has 15 before date
and 20 after that date. Here is my query so far. any ideas on how i can
icorpirate what i want to do
SELECT DISTINCTROW Format$(tblTimeSheet.Date,'ww',4) AS WeekEnding,
tblTimeSheet.Employee, Sum(tblTimeSheet.Units) AS [Sum of units]
FROM tblEmployees INNER JOIN tblTimeSheet ON tblEmployees.
EmployeeID=tblTimeSheet.Employee
WHERE (((tblTimeSheet.Date)>=forms!FrmSwitchboard![1sttsent] And
(tblTimeSheet.Date)<=Forms!FrmSwitchboard!wkedng And (tblTimeSheet.Date)
Employee)=forms!FrmWageBal!Employee))
GROUP BY Format$(tblTimeSheet.Date,'ww',4), tblTimeSheet.Employee;
I hope i'm making sense.
Thanks Regan
is tblPaychanges. where if and employee gets pay changes it is recorded. it
records the date of the change and the change itself.
Now in the query io want to have a column [PayRate].
how do i make a query so that the payRate before a certain date is 100 but
not after that date
Table Paychanges
PayID EmployeeID PayDateChange Rate
1 8 31/05/06 15
2 8 11/07/06 20
3 9 18/07/06 21
i want it so in the Rate column in my query for EMployee 8 has 15 before date
and 20 after that date. Here is my query so far. any ideas on how i can
icorpirate what i want to do
SELECT DISTINCTROW Format$(tblTimeSheet.Date,'ww',4) AS WeekEnding,
tblTimeSheet.Employee, Sum(tblTimeSheet.Units) AS [Sum of units]
FROM tblEmployees INNER JOIN tblTimeSheet ON tblEmployees.
EmployeeID=tblTimeSheet.Employee
WHERE (((tblTimeSheet.Date)>=forms!FrmSwitchboard![1sttsent] And
(tblTimeSheet.Date)<=Forms!FrmSwitchboard!wkedng And (tblTimeSheet.Date)
(tblTimeSheet.Code))<>24 And ((tblTimeSheet.Code))<>25) And ((tblTimeSheet.=tblEmployees.AutopayStDate) And (((tblTimeSheet.Code))<>23 And (
Employee)=forms!FrmWageBal!Employee))
GROUP BY Format$(tblTimeSheet.Date,'ww',4), tblTimeSheet.Employee;
I hope i'm making sense.
Thanks Regan