Chapter 18: Advanced Access Query Techniques
641
- Click the
parameter in the window at the top and type ādā (a d in quota-
tion marks). - Click
and replace it with 45 (see Figure 18.4).
FIGURE 18.4
The Expression Builder provides help for composing complex expressions.
- Click
to select it. - Go back to the Expression Elements window and expand Chapter18.accdb, expand
the Tables tree, and then select tblSales by clicking it once.
Access moves the parameter
- Double-click InvoiceDate in the Expression Categories area.
Access places the table and field name in the last part of the DateAdd function in the top
Expression Builder window.
- Click OK to close the Expression Builder.
Access returns to the QBE pane and places the expression in the cell for you.
- Access assigns a name for the expression, automatically naming it Expr1. Change the
field name to DueDate by highlighting Expr1 and entering DueDate.
If you perform these steps correctly and widen the column to display the entire expres-
sion, the cell should look like Figure 18.5. The DateAdd() function adds 45 days to the
InvoiceDate in tblSales. The d signifies that you are working in days rather than
months, weeks, or years.