Update a table after delete
Posted on 2008-01-27
I am trying to update a certain table after I delete a record in another table.
Both tables have a field "MED_ID" in common.
So when I delete a selected record in table2 (the table I do the deleting from)
I would like to update Table1 so that a field in this table ,called "Available" changes
its value from No to Yes.
I tried afterdelete of the table2:
ADOQuery1.SQL.Text:= 'update Table1 set Available =''Yes'' where Med_ID ='+QuotedStr(CurrentMed_ID);
database is access 2003 and MED_ID is the text field.
but it dont seem to work.
Any way to do it?