Database Reference
In-Depth Information
Q&A
Question: The MySQL trigger includes both the
New
and
Old
qualifiers. In Access, the data macro only
uses the
qualifier?
Answer: If you omit the qualifier, Access assumes that you are using the
Old
qualifier. Why doesn
'
t Access also use the
New
New
qualifier. You only need to
specify the
Old
qualifier in a data macro.
147
Figure 4-31 shows the data macro associated with the After Delete event for the OrderLine table. This
data macro is also similar to the data macro for the After Insert event, with two differences. First, the Value
argument indicates that the new value is the result of subtracting the old value of NumOrdered
([Old].[NumOrdered]) from OnOrder. The second difference is in the Where Condition argument. Because
the record has been deleted from the OrderLine table, there is no [OrderLine].[PartNum]. Thus, the value of
the argument must refer to the old value of PartNum ([Old].[PartNum]).
Value of PartNum
before the deletion
New value (previous value
in OnOrder ield minus old value
in NumOrdered ield)
FIGURE 4-31
Macro Designer window for the After Delete event associated with the OrderLine table
Search WWH ::




Custom Search