- Preventing Errors by Validating Data
- Using Controls to Limit Data Entry Choices
- Entering Data with ActiveX Controls
- Collecting Form Data via Email
- From Here
Collecting Form Data via Email
Although small databases are often managed by a single person, larger databases require input from multiple people. If those people are on your network, such collaboration is most easily achieved either by placing the database in a shared network location or by moving some or all of the data to a SharePoint site. However, what do you do if your collaborators don't have network access? One solution would be to export the necessary tables and forms into another database and then email that database to the collaborators. When the data is returned, you could then import it back into your database.
Such a solution is workable, but a little too unwieldy to be practical. Fortunately, Access 2007 comes with a new feature called Access Data Collection (ADC) that makes email-based data collection much easier. With this feature, you create a form that includes fields for the data you want to collect, place that form in an HTML email message, and then send that message to every person from whom you want to collect the data. Each person fills in the form and returns the message, which is then saved in a special Outlook folder called Access Data Collection Replies. You then synchronize Access (by hand or automatically) with those replies, and the data is added to the underlying table.
Sending the Access Data Collection Email Message
Unlike the other forms you've seen in this chapter, an ADC form cannot be created by hand. Instead, Access runs a wizard that builds the form step by step, as shown in the following procedure:
- Use the Navigation pane to click the table you want to use to store the collected data.
- Choose External Data, Create E-mail. Access starts the ADC Wizard.
- In the initial wizard dialog box, click Next. The wizard asks whether you want to use an HTML form or an InfoPath form.
- Click HTML Form and then click Next.
- If the table already contains data, the wizard asks whether you want to collect new information or update existing information. Click one of the following options and then click Next:
- Collect New Information Only—Click this option to send a blank form for new data.
- Update Existing Information—Click this option to send existing data for the recipient to edit. The record that contains the recipient's address is the record the recipient will edit.
- For each field you want to include in the form, click the field and then click > (or click >> to add all the fields). Click Next.
- If you want Access to synchronize with Outlook automatically when the replies arrive, click to activate the Automatically Process Replies and Add Data to Table check box (where Table is the name of the table you chose in step 1) and then click Next.
- Choose how you want to specify the message recipients (click Next after you've made your choice):
- Enter the E-mail Addresses in Microsoft Office Outlook—Click this option to enter the recipients by hand in the Outlook message window that appears later. Skip to step 10.
- Use the E-mail Addresses Stored in a Field in the Database—Click this option if you have the recipients' addresses stored in the current database. Proceed to step 9.
- Specify the addresses in the database using one of the following options (click Next when you are done):
- The Current Table or Query—Click this option if the email addresses are stored in the table you're using with ADC. Use the associated list to click the field that contains the addresses.
- An Associated Table—Click this option if the addresses reside in another table that's related to the current table. First, use the associated list to click the field in the current table upon which the relationship is based. Second, when Access displays a list of fields in the related table, use the list to click the field that contains the email addresses.
- Edit the message Subject and Introduction, as needed. If the addresses came from the Access database, click where you want the addresses added: the To Field, Cc Field, or Bcc Field. Click Next.
- You now have two ways to proceed:
- If you choose an Access field for the recipient addresses, click Next. Access displays a list of the recipients with check boxes for each address. Leave the check boxes activated for the recipients you want to receive the message. When you are done, click Send.
- If you will be specifying recipients via Outlook, click Create to create the message, select the recipients, and then click Send.
Replying to an Access Data Collection Email Message
If you receive an ADC message, you need to fill in the fields and return the message. Here are the steps to follow:
- Click the Access Data Collection message and then click Reply. Access displays the message window.
- Scroll down the message body until you see the form, as shown in Figure 3.13.
Figure 3.13 When you reply to an ADC message, fill in each form field in the body of the reply.
- Click inside a form field and type the data.
- Repeat step 3 for each field.
- After you've filled in each field, click Send.
Managing the Access Data Collection Replies
As I mentioned earlier, when you receive replies to your messages, they are automatically routed to the Access Data Collection Replies folder in Outlook. (This is a subfolder of the Inbox folder.) If you didn't set up Access to handle the replies automatically, follow these steps to handle a reply manually:
- In Outlook, open the reply.
- Click Export to Access. Outlook asks you to confirm.
- Click OK. Outlook exports the data.
- Click OK.