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” but-
ton 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.
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 acFormatPDFnamed constant as the value of the outputfileargument of the OutputTo
method to create a PDF file, as in the code sample below.
NEW FEATURENEW FEATURE
Part II Writing VBA Code to Exchange Data between Office Components