Emailing Shipping and Reordering Reports

After you ship out orders, using the shipping labels described in an earlier section, you might need to produce reports detailing the amounts of different products that were shipped and the amounts that need to be ordered to replenish stock, and then email these reports to various persons. The Shipping Reports and Reordering form, shown in Figure 12.25, lets you see the inventory for all products where the amount in stock plus the amount on order is at or under the reorder level for that product. The ReorderAmount field (initially set to zero for all products) indicates the number of cases you want to reorder.

Since this form only has data if at least one product is below the inventory reorder level, when you click the "Email Shipping and Reordering Reports" button on the main menu, if there is enough inventory for all products, you will get the message shown in Figure 12.26.

FIGURE 12.25

A form for replenishing inventory.

FIGURE 12.25

A form for replenishing inventory.

FIGURE 12.26

A message when all products have enough inventory.

FIGURE 12.26

If you click the Yes button on this dialog, the Edit Amounts form will open, as shown in Figure 12.27, where you can edit product amounts as needed.

FIGURE 12.27

A form for editing product amounts.

FIGURE 12.27

A form for editing product amounts.

On the Shipping Reports and Reordering form, the "2x Reorder" button sets the Reorder Amount to twice the Reorder Level for all records; the "Zero Reorder" button sets the Reorder Amount to zero for all records. You can also manually edit the Reorder Amount for any product as desired. After setting the Reorder Amount as desired for all records, click the "Send Shipping Reports" button to save the Shipping report (rptShipping) as a PDF file, update field values in tblProducts as needed, and create a new email message with the report file attached to it, ready to email to the appropriate address (if the report is always sent to the same person or department, the email address could be hard-coded). Figure 12.28 shows the shipping report.

. i. ^ v- -r* -rf'f rj^ Although saving to the PDF format didn't make it to the release version of Access 2007, Microsoft has provided a downloadable utility that adds PDF support to Access. This utility can be downloaded from http://www.microsoft.com/downloads/details.aspx?familyid= F1FC413C-6D89-4F15-991B-63B07BA5F2E5&displaylang=en (or search the Microsoft Downloads page for "Save to PDF"). Once you have downloaded and installed it, you will see a new "Save to PDF" selection on the Save As submenu of the File menu, as shown in Figure 12.29, and you can use the acFormatPDF named constant as the value of the outputfile argument of the OutputTo method to create a PDF file, as in the code sample below.

Was this article helpful?

0 0

Post a comment