Hi, I get this message when I try to run a delete query.
I would like to delete everything from tblVolunteer when in tblVolunteerProject.EndDate= <Date()-730. (ie basically all records 2 years old). The SQL code is this.
TDELETE tblVolunteer.VolunteerID, tblVolunteer.Surname, tblVolunteer.[First Name], tblVolunteer.Title, tblVolunteer.Gender, tblVolunteer.[Volunteer Type], tblVolunteer.[UK Address 1], tblVolunteer.[UK Address 2], tblVolunteer.[UK Address 3], tblVolunteer.[UK Post Code], tblVolunteer.[Foreign National Address 1], tblVolunteer.[Foreign National Address 2], tblVolunteer.[Foreign National address 3], tblVolunteer.[Foreign National Address Post Code/Zip], tblVolunteer.[Next of Kin], tblVolunteer.[Next of Kin Telephone Number], tblVolunteer.Religion, tblVolunteer.DOB, tblVolunteer.Age, tblVolunteer.[Home Telephone], tblVolunteer.[Mobile Telephone], tblVolunteer.[Email Address], tblVolunteer.[Subject Studied], tblVolunteer.[Interest Area], tblVolunteer.CV, tblVolunteer.Ref1, tblVolunteer.Ref2, tblVolunteer.[OHF Sent], tblVolunteer.[OHF Received], tblVolunteer.[CRB Sent], tblVolunteer.[CRB Received], tblVolunteer.[Induction Date], tblVolunteer.[Badge Received], tblVolunteer.[Ward Interview Date], tblVolunteer.[Interviewed by], tblVolunteer.[Interview Date], tblVolunteer.Remarks, tblVolunteer.[Project update], tblVolunteerProject.EndDate
FROM tblVolunteer INNER JOIN tblVolunteerProject ON tblVolunteer.VolunteerID = tblVolunteerProject.VolunteerID
WHERE (((tblVolunteerProject.EndDate)<Date()-730));
I would be grateful for any help. Thanks
I would like to delete everything from tblVolunteer when in tblVolunteerProject.EndDate= <Date()-730. (ie basically all records 2 years old). The SQL code is this.
TDELETE tblVolunteer.VolunteerID, tblVolunteer.Surname, tblVolunteer.[First Name], tblVolunteer.Title, tblVolunteer.Gender, tblVolunteer.[Volunteer Type], tblVolunteer.[UK Address 1], tblVolunteer.[UK Address 2], tblVolunteer.[UK Address 3], tblVolunteer.[UK Post Code], tblVolunteer.[Foreign National Address 1], tblVolunteer.[Foreign National Address 2], tblVolunteer.[Foreign National address 3], tblVolunteer.[Foreign National Address Post Code/Zip], tblVolunteer.[Next of Kin], tblVolunteer.[Next of Kin Telephone Number], tblVolunteer.Religion, tblVolunteer.DOB, tblVolunteer.Age, tblVolunteer.[Home Telephone], tblVolunteer.[Mobile Telephone], tblVolunteer.[Email Address], tblVolunteer.[Subject Studied], tblVolunteer.[Interest Area], tblVolunteer.CV, tblVolunteer.Ref1, tblVolunteer.Ref2, tblVolunteer.[OHF Sent], tblVolunteer.[OHF Received], tblVolunteer.[CRB Sent], tblVolunteer.[CRB Received], tblVolunteer.[Induction Date], tblVolunteer.[Badge Received], tblVolunteer.[Ward Interview Date], tblVolunteer.[Interviewed by], tblVolunteer.[Interview Date], tblVolunteer.Remarks, tblVolunteer.[Project update], tblVolunteerProject.EndDate
FROM tblVolunteer INNER JOIN tblVolunteerProject ON tblVolunteer.VolunteerID = tblVolunteerProject.VolunteerID
WHERE (((tblVolunteerProject.EndDate)<Date()-730));
I would be grateful for any help. Thanks