DELETE Query wants o know about which table to delete from - JOINE

B

BlueWolverine

Hello,
MS ACCESS 2003 on XP PRO.

My delete query, which is meant to join two tables, and delete from Table A
all the records in it, not in Table B.

Below is the Code for the query. The problem is that the select aspect
works perfect but when I try to run the delete, it asks me to specify a table.
DELETE t2.Program, t2.ModelYear, t2.BuildPhase, t2.Month, t2.TagType,
t2.Projection, t2.Actual, t2.MonthName, t2.MonthDate, t2.CalendarYear,
t1.ModelYear, t1.ProgramName, t1.BuildPhase, t1.TagType, t1.Month,
t1.YearChoice


FROM t_TempCounts as t1 RIGHT JOIN t_VehicleCounts as t2 ON (t1.YearChoice =
t2.CalendarYear) AND (t1.TagType = t2.TagType) AND (t1.Month = t2.Month) AND
(t1.BuildPhase = t2.BuildPhase) AND (t1.ModelYear = t2.ModelYear) AND
(t1.ProgramName = t2.Program)


WHERE (((t2.CalendarYear)=[Forms]![frm_MAINMENU]![YearPick]) AND
((t1.ModelYear) Is Null) AND ((t1.ProgramName) Is Null) AND ((t1.BuildPhase)
Is Null) AND ((t1.TagType) Is Null) AND ((t1.Month) Is Null) AND
((t1.YearChoice) Is Null));
<<<<

Help!

Thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top