Code:
Okay, I have 4 tables that I have to keep separate. Employees, PayHistory, Codes and AwardDates.
Employees has 2 fields: EmpNo, Group
PayHistory has 4 fields: EmpNo, DBA, Date, Hours
AwardDates has 4 fields: Group, Type, Current, CalcDate
Codes has 3 fields: DBA, Sick, Vac
Each table has various relationships:
Employees.EmpNo = PayHistory.EmpNo
PayHistory.DBA = Codes.DBA
AwardDates.Group = Employees.Group
I need to delete all records from PayHistory where Date > CalcDate when Current = true and Type = “Vacation” and Vac = “Y”
Can anyone tell me the VB code for this?