Chapter 8 Exercise 18

18. Explain how the list box is used to handle receipt of merchandise from suppliers. Outline the process that is used to tie the receipt to the purchase order.

This is a tricky form that was specifically designed to make it easier for users to understand the process. The rarely-used list box comes in handy because it shows several columns for multiple orders from a manufacturer. The list box makes it easy for the user to identify the proper order or to sort the list. You might consider using a ComboBox or drop down list for the same purpose, but the list would be huge and harder to sort on the fly.

The checkboxes enable the user to quickly sort the list�including sub-sorts by checking multiple boxes.

The PO Details button opens the Purchase Order form for the selected purchase.

If you look at the design view, you will see that the list box is unbound�it is not a data-entry item. It�s source data is loaded from an SQL statement:
SELECT PurchaseOrderQuery.PurchaseID, PurchaseOrderQuery.ManufacturerName, PurchaseOrderQuery.OrderDate, PurchaseOrderQuery.ReceiveDate, PurchaseOrderQuery.EmployeeID, PurchaseOrderQuery.TotalList
FROM PurchaseOrderQuery;

This statement is altered by the checkboxes�which add an ORDER BY clause.

When an item is selected in the list box, the PurchaseOrderID is linked to the main form�which consists of the PONumber, Manufacturer Name, OrderDate and ReceiveDate. This process is handled through a FindOrderNumber function on the main form.

To simplify data entry, when a user clicks (or double clicks) an order that has a null ReceiveDate, the form records the entire order as being received and updates the inventory QOH values.