Re: filter a table based on a query
- From: "Michel Walsh" <vanderghast@VirusAreFunnierThanSpam>
- Date: Wed, 21 Mar 2007 10:05:43 -0400
Why you don't use a cascade delete? if possible, that would be definitively
safer than being obliged to run an extra query... I admit this is not always
doable, though.
Vanderghast, Access MVP
"justine" <justinecandoit@xxxxxxxxx> wrote in message
news:1174442004.897404.89530@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
What I really want to do is update a table when another table has been
edited.
I have a table of attendence, and another for registration that the
table attendence is created from based on an Append Query.
I managed to create a delete query for when course are cancelled to
delete records in the attendence table, but when an individual cancels
a course, I'm having trouble figuring out how to delete because this
query and table are not linked directly.
So I was thinking alternatively of writing a macro and applying a
query to filter my table and then working out that all 'present'
fields should be unmarked, or having the user do it, but I can't get
it to work...
My attempt at delete query is:
DELETE tblCourse_Attendence2.*, tblRegistration.Cancellation
FROM tblRegistration INNER JOIN tblCourse_Attendence2 ON
(tblRegistration.FullName = tblCourse_Attendence2.Full_Name) AND
(tblRegistration.CourseYr = tblCourse_Attendence2.CourseID)
WHERE (((tblRegistration.Cancellation)=True));
and error message is:
"could not delete from specified tables"
Thanks!
-justine
.
- Follow-Ups:
- Re: filter a table based on a query
- From: justine
- Re: filter a table based on a query
- References:
- filter a table based on a query
- From: justine
- filter a table based on a query
- Prev by Date: Text Box in Form vs. User-Defined Criteria
- Next by Date: Re: problem with IIF expression in query criteria containing OR condit
- Previous by thread: Re: filter a table based on a query
- Next by thread: Re: filter a table based on a query
- Index(es):
Relevant Pages
|