- Understanding Access Functions and Modes
- Opening the Northwind.accdb Sample Database
- Understanding Access's Table Windows
- Navigating the Home and Create Ribbons
- Using the Function Keys
- Setting Default Options
- Creating a Customized Template File
- Using Access Online Help
- Spelunking the Database Utilities
- Packaging, Signing, and Distributing an Access 2007 Database
- Troubleshooting
- In the Real WorldReading the Ribbon UI's Tealeaves
Packaging, Signing, and Distributing an Access 2007 Database
The Publish menu of Office button's gallery offers the following two choices:
- Document Management Server—Publishes the database to a WSS 3.0 or MOSS 2007 site and enables users to open a read-only or read-write copy, depending on their group membership. Chapter 25 shows you how to share databases from a SharePoint document library.
- Package and Sign—Creates an Access Deployment file (.accdc) whose origin and integrity is certified by a digital signature. You can deploy database copies from an .accdc file published to a SharePoint document library. The sections that follow describe how to generate a self-signed digital certificate and then use the certificate to sign an Access Deployment file.
Generate and Install a Self-Certified Digital Certificate
To create a self-signed certificate, do the following:
- Choose Start, Programs, Microsoft Office, Microsoft Office Tools, Digital Certificate for VBA Projects to open the Create Digital Certificate dialog. Type the name for the certificate in the text box (see Figure 3.40).
Figure 3.40 Type a certificate name in the text box and click OK to add the certificate to Windows' Personal certificate store.
- Click OK to add the certificate to the Personal category of the Windows certificate store, which is managed by IE.
- Launch IE. Click IE 7's Tools button or choose Tools, Internet Options in earlier versions to open the paged Internet Options dialog. Click the Content tab and Certificates button to open the Certificates dialog, and click the Personal tab to display the certificate you created in step 2 (see Figure 3.41).
Figure 3.41 IE's Certificates dialog displays the new self-signed certificate on the Personal page.
- Select the certificate, click Export to start the Export Certificate Wizard, and click Next to open the Export Private Key dialog. This option isn't available for self-signed certificates, so click Next to open the Export File Format dialog.
- Accept the default DER-Encoded Binary X.509 (.CER) option, and click Next to open File to Export dialog.
- Click Browse to open the Save As dialog, navigate to a folder in which to save the certificate, type a filename (OakLeafCodeSigningCertificate for this example), and click Save to save the file with a .cer extension. Click Finish to dismiss the Wizard and acknowledge the "Certificate export was successful" message.
- Click the Certificates dialog's Trusted Root Certificate Authorities tab, click the Import button to start the Certificate Import Wizard, and click Next to open the File to Import dialog.
- Click Browse to open the Open dialog, navigate to the location you specified in step 6, and double-click the certificate file. Click Next to open the Certificate Store dialog.
- Accept the default Place All Certificates in the Following Store option, verify that the Certificate Store is Trusted Root Certificate Authorities, and click Next and then Finish to display a security warning (see Figure 3.42).
Figure 3.42 This security warning appears for any certificate you add to the Trusted Root Certificate Authorities list. The default list contains most generally accepted certificate authorities (CAs).
- Click Yes to add the certificate to the Trusted Root Certificate Authorities group. Double-click the item to verify the certificate (see Figure 3.43).
Figure 3.43 A certificate with the purposes "Ensures software came from software publisher" and "Protects software from alteration after publication" is a code-signing certificate.
- Repeat steps 7 to 9, except substitute Trusted Publishers for Trusted Root Certificate Authorities in each step. In this case, you don't receive the security warning described in step 9.
- Click Office, Access Options, Trust Center, Trust Center Settings, Trusted Publishers and then verify that your certificate appears in the Trusted Publishers list (refer to Figure 3.29).
- Click Macro Settings, and select the Disable All Macros Except Digitally Signed Macros option (refer to Figure 3.31). Click OK twice to save your changes and return to your source database.
Creating, Signing, and Testing the Package
To create, sign, and test the package file, do the following:
- Open the .accdb file to package (preferably a database with VBA code in a class module or standalone module), and choose Office, Publish, Package and Sign to open the Select Certificate dialog.
- Select the certificate you created in the preceding section (see Figure 3.44), and click OK to open the Create Microsoft Office Access Signed Package dialog.
Figure 3.44 You must specify a valid code-signing certificate before creating the package.
- Set the distribution location, accept the filename and .accdc extension, and click Create to sign and compress the .accdb file to the .accdc file.
- Navigate to the distribution location, and double-click the .accdc file to open the Extract Database To dialog.
- Navigate to the location in which to save the .accdb file (not a trusted location), and click OK to extract the signed database file.
- Open the extracted .accdb file.