Page 114 - AIS access_chang_ingraham
P. 114
112 CHAPTER 5 ACQUISITION/PAYMENT BUSINESS PROCESS
15. There is one more step we have to make to arrive at outstanding accounts
payable. Click on Create query in Design view once more. However, this time we will
click on the Queries tab. Notice that we have the two queries that we have just created listed
here. Click on the Total Cash Disbursements Query, hold down the Ctrl key, and click
on the Sum Purchases Query in the Show Table window, click Add and click Close.
16. Drag SumOfinventoryPurchased into the first field of the design grid and
SumOfAmountApplied into the second field of the design grid.
17. We need to create a field for the Accounts Payable calculation in the third field.
Click on the Field property on the third field and click on the Build ~~ icon.
18. It is possible (although not likely, unless we were at the beginning of the period)
that we could have null values if there were no purchases during the period. Access can-
not handle null values in a calculation and it returns a null value. To deal with this possi-
bility, we insert the "null-to-zero" or Nz function into every part of the expression in which
there is a possibility of a null value. (Note that it must be applied to each part of the expres-
sion separately rather than to the overall expression or it will evaluate the entire expres-
sion for null values.)
In the lower-left window, double-click on the Queries folder and open the Sum
Purchases Query. In the upper portion of the window, type "Accounts Payable: Nz(".
Double-click on SumOfinventoryPurchased in the middle lower portion of the window
to add it to the upper portion of the window. Double-click on Total Cash Disbursements
Query. Type ". Nz(" Double-click on SumofAmountApplied in the middle lower portion
of the window to add it to the upper portion of the window. Remove the «Expr» from
the beginning of the expression. Click OK.
1'21~
rExpres~ion Builder
AcoountsPayable: «Expr»rJZ([Sum Purchases I OK I
Query]! [SumOfInventoryPurchased]}-Nz{[TotaI Cash Cancel 1
Disbursements Query]! SumOfAmountApplied)1
Undo 1
+ - I *I~ = > < <>1 And Or Not Likel.ill Paste Help 1
o Accounts Payable QUI;' SumOfInventoCiPurchc IL<.;.,:V..::a"",,lu~e'-> "r
(±) Table..s >--
t=J Queries §
LJ Accounts Payable :,
LJ Quantity Purchase -
[ 127[sum Purchases QI
LJ Total Cash Disbur;
(±) Forms R
<I 1111 I hI]
ru(stringexpr)
FIGURE 5-33

