I have a table (TblEmployees), with the Social Security Number as primary
key.
The 2nd Table is (tblYearToDate) that has many columns, containing the year
to date payroll transactions for the employee.
The 3rd table (tblHoursbyDay), which is the current week table. This table
has a line for every day the employee worked and for each different job. In
a query (QryAddWeDate), I add the week ending date and another field which
subtracts 7 days from the WEDate, for a PriorWeekDate.
In each table an employee can have several rows of data per week, because
there is a line for every job that he worked on in one week.
For the comparison purpose, I created 2 new queries. From QryAddweDate I
show only the PriorWeekDate and SocialSecurityNumber, and from the
TblYearToDate the WEDate and Social. I now I want to compare the
PriorWeekDate to the Last WeDate on the tblYearToDate.
Which works fine - I am able to compare that with grouping.
Now I would like to create an update query where the last WeDate the
employee worked and if he did not work this week, I would like to update the
TerminationDate field in the employee Table with the last WEDate from the
TblYearToDate.
Hope you haven't lost patience with me.
Annelie
First I built a query