Welcome to MSDN Blogs Sign in | Join | Help

Microsoft Access Team Blog

Get product announcements, tips and tricks, and news directly from the team @ Microsoft.
Data Collection Through Email
One of the coolest new features in Access 2007 is the ability to gather data through emailed forms.  These forms can be used to either update existing data or to gather new data.  The forms can either be rich InfoPath forms that show up in-place in Outlook 2007 email messages, or they can be very simple HTML forms that can be completed by users of practically any email client.  When the forms are returned to your machine, the data is extracted from the email message (either automatically or manually at your discretion) and uploaded to the database.  In fact the data can even be linked to any linked table in Access, so can be stored in SharePoint or even SQL Server if you'd like.  Data Collection is a very handy way to do a variety of things, from gathering simple data (e.g. what are you bringing to the pot luck) to periodically updating more complex data (e.g. annual updates to customer contact information).

HTML Data Collection

We'll walk through 2 scenarios in this post - one for collecting new data with an HTML form, the other for updating existing data with an InfoPath form.  Data collection works on tables and queries, so the first step is to select a table or query from the Nav Pane.  You can either right-click on the object and select "Collect and Update Data via E-mail"

or you can click on "Create Email" under the "Collect Data" chunk of the "External Data" tab in the ribbon UI.

(Click image to enlarge)

That launches a wizard to create and send the email.  The first step of the wizard describes the process:

(Click image to enlarge)

Next, you choose whether to send InfoPath or HTML mail.  InfoPath provides a rich experience with dropdown controls, in-form validation, and so on.  Although HTML pages can contain these things, HTML mail cannot as they're blocked by most firewalls and email gateways.  As a result, HTML forms are simple edit controls.  In this case, we'll choose HTML:

(Click image to enlarge)

The next step is to choose which fields to include in the emailed form:

(Click image to enlarge)

Then you choose what happens to the mails when they come back.  You can either have the replies processed automatically or manually do it yourself:

(Click image to enlarge)

If you choose to process replies automatically, you can set the following options to govern how that automatic processing works by clicking on the "Set properties..." link on the wizard dialog.

Next, you have to tell Access who to send the forms to.  You can either use a link to a table of email addresses or you can simply type a list of names into the email header:

(Click image to enlarge)

The next to the last step is to create a subject line for the email and (optionally) type an introduction that goes in the top of the email, above the form:

(Click image to enlarge)

Finally, you can hit the "Create" button and we'll create the email message, and it is ready to send - all you need to do is hit "Send" in the Outlook send note:

(Click image to enlarge)

The final email message will look something like this:

(Click image to enlarge)

InfoPath Data Update Mail

The process for creating a mail to update a table with a form sent through InfoPath is quite similar.  If the table or query you select in the first step has any data in it, you'll be asked if you'd like to simply collect new information or update the existing information (this pane of the wizard didn't show in the example above because the table was empty).  Users who are asked to update information can also add new records at the same time.  In this case, we'll update the existing information:

(Click image to enlarge)

When automatically processing replies for data updates, you can control what happens to additional records (either automatically adding or discarding them).

(Click image to enlarge)

In this example, we'll use a list of email names in the database rather than manually typing them into the Outlook mail note:

(Click image to enlarge)

Just as before, you can set the email header and introduction.  In addition, you can choose where the addresses are attached to the mail (e.g. so you can set them to the BCC line and prevent everyone from seeing them).

(Click image to enlarge)

Since the email that is sent will contain data (rather than simply a form), there's a warning that you're sending out potentially confidential or sensitive data, and to verify what you're doing.

(Click image to enlarge)

The last page of the wizard shows each of the email recipients, and allows you to verify that you're mailing the right list.  This allows you to make sure that the mails go to the right people, since you're pulling the addresses from a table rather than manually typing them in as you did in the previous example.

(Click image to enlarge)

The final InfoPath email is a rich form that users can update directly from the Outlook email reply note. 

(Click image to enlarge)

Next Time

In the next post, I'll show what happens when the replies come back. 

Posted: Friday, June 30, 2006 4:00 PM by Erik Rucker

Comments

Alan Cossey said:

This looks really, really good. Using HTML for basic data gathering is good, but the Infopath forms look excellent. Is Microsoft going to release an Infopath "runtime" for people who want to use Infopath forms for such Access-based data collection? I see that various people and companies are trying to do such things and it seems strange that Microsoft have not filled this hole themselves (if I have understood this correctly of course).
# July 1, 2006 3:52 AM

AL said:

Sounds really great!

Please tell us a bit about adding code behind the controls of HTML vs InforPath forms.  Does either type of form support any kind of event model (for validatation, etc) ?
# July 3, 2006 12:48 AM

Mike Alexander said:

This feature is no doubt one of the best new features of Access.  However, Microsoft Outlook security prevents HTML mail in many organizations.  Is there an option to return text responses?
# July 3, 2006 4:44 AM

AL said:

Is there any way to convert Access forms to HTML or InfoPath for data collection?  If so, what about code or macros in the form?
# July 3, 2006 11:49 AM

Clint said:

>> Is Microsoft going to release an Infopath "runtime" for people
>> who want to use Infopath forms for such Access-based data collection?

There has been discussion about an InfoPath runtime but we don't have anything to announce on that topic.

>> Please tell us a bit about adding code behind the controls of
>> HTML vs InfoPath forms.  Does either type of form support
>> any kind of event model (for validatation, etc) ?

Field and table level validations are enforced when the data is actually added to the records.

You likely won't ever get clientside validation for HTML forms as all popular email clients block script.

InfoPath forms will require users to enter required fields but not field and table validations in the browser message. We will be writing a white paper about how you can create custom InfoPath forms that could have client-side validation rules.

>> Is there an option to return text responses?

Not at this time--something we want to consider for the vnext.

>> Is there any way to convert Access forms to HTML or InfoPath for data collection?

Not at this time--something we want to consider for the vnext.
# July 5, 2006 12:12 PM

Micah Rousey said:

I am already contemplating application of this new feature.  I can't count the number of systems I've built already that could have used this feature.  (Systems that email invitations to take a survey with a link to a webpage are ok, but this solution is great.)  If I stay in the consulting world, this will definately be an added plus.

These questions may be answered in the next post, but if not, I'll ask them now:  

Is the email adress of the responder going to be a capturable field?  
# July 5, 2006 1:47 PM

rmcgaffic said:

This may be offpoint, but will Access 2007 still work with DAO?

I am trying to install MS Note 209891 "How to fill a treeview control recursively in Access 2000."  If you remember, this is a hierarchy of Northwind employees reporting relationships based on the field "ReportsTo".

I have no problem placing the Microsoft Treeview control 6.0 (SP6) control on my form.

The note says that Microsoft DAO 3.6 Object Library must be available, and when I go to my form's code for References and check the DAO 3.6 Object library line and then [OK], the following error message results:

Name conflict with existing module, project, or object library.

Does anyone know if this is by design, a bug, or whether a workaround exists.  Note that this note is an update of Access 97 note 167309.  If MS has changed the rules, it sure would be nice for them to publish a note update for Access 2007.

Bob
# July 9, 2006 9:59 AM

rmcgaffic said:

I have just determined by experimentation that the following objects have a conflict and may not be used together:

Microsoft Office 2007 Access DB engine objects
Microsoft DAO 3.6 Object library.

Does anyone have some sample code of how to fill a treeview control without using DAO?

Thanks,
Bob
# July 10, 2006 10:38 AM

A discussion of what's new in Access 2007 (formerly "Access 12") said:

In the last post, we talked about sending out data collection emails.  In this post, we'll talk...
# July 11, 2006 5:21 PM

BCinNYC said:

YIKES!

quote:
<I have just determined by experimentation that the following objects have a conflict and may not be used together:

Microsoft Office 2007 Access DB engine objects
Microsoft DAO 3.6 Object library.

I say again - YIKES!  Is it true that DAO cannot be used in 2007???

This would mean serious retooling of many, many deployed apps...

BC
# July 12, 2006 12:25 PM

Neil said:

Bob, there is no need to use the "Microsoft Office 2007 Access DB engine objects" and the "Microsoft DAO 3.6 Object" library together because they are mutually exclusive.  The "Microsoft Office 2007 Access DB engine objects" are a complete superset of DAO 3.6.  

None of your existing code needs to change in order to use the new Access database engine objects.  All of your existing code will run unmodified.

The code to fill a TreeView Control with data is the same regardless of whether you are using DAO or the new Access database engine objects.
# July 12, 2006 12:39 PM

kui said:

opo[[
# July 18, 2006 11:54 PM

Angelo said:

When receiving replies to my form, messages are not processed by outlook, i.e. they are not sent in the folder defined by the wizard and I don't see "Export data in Microsoft office access" when I right clik on the reply. Addin for data collection in outlook is enabled.
Help?
# August 5, 2006 4:11 AM

Tim Gould said:

I was keen to see if Pocket Outlook (WM 5.0) would be able to handle these email forms - unfortunately it appears not. Is there an add-in that could allow/enable this as filling out these forms on a pda would be extremely useful.
# September 14, 2006 11:27 AM

Britney said:

Hello, nice site look this:

http://boots.paritsa.info <a href=http://boots.paritsa.info>boot</a> [url=http://boots.paritsa.info]boot[/url]

End ^) See you

# November 3, 2006 2:42 AM

Plimnaz said:

Nice site guys.. didnt have a chance to meet you guys at the conference but hope to see you guys in bing in the near future. stay up.

# November 3, 2006 3:05 AM

Somael said:

Carisoprodol is best pain killer! Buy it! http://haygoodlab.ucsd.edu/discus/messages/24/404.html

# November 25, 2006 4:35 AM

Carisoprodol said:

Carisoprodol is best pain killer! Buy it!

# November 25, 2006 6:08 AM

temazepam said:

Good work.

<a href="http://home.no/temazepam/ ">Temazepam

( Razepam, Restoril, Temaz )</a>

[url=http://home.no/temazepam/]Temazepam

( Razepam, Restoril, Temaz )[/url]

http://home.no/temazepam/  Temazepam

( Razepam, Restoril, Temaz )

# November 25, 2006 10:23 AM

Gasinas said:

Sorry about the first entry. My fingers don't always go where they should.

# November 30, 2006 10:24 PM

tvshow said:

Cool site. But my is better ;)

http://tvshow.ojduu.info/map.html#

# December 18, 2006 5:02 PM

italy said:

Cool site. But my is better ;)

http://italy.dda3e.info/map.html#

# December 18, 2006 8:18 PM

podrt said:

# December 19, 2006 8:24 AM

arizona said:

# December 19, 2006 10:19 AM

faculty said:

# December 19, 2006 11:13 AM

maui said:

# December 19, 2006 12:32 PM

boyles said:

Merry Christmas

http://boyles.sdsmt.edu/_disc86/000001aa.htm

Best regards,

# December 19, 2006 1:26 PM

oiepmis said:

Merry Christmas

http://www.oiepmis.bia.edu/_disc2/000010b2.htm

Best regards,

# December 19, 2006 2:13 PM

csespsu said:

# December 19, 2006 3:30 PM

facultyfp said:

# December 19, 2006 6:43 PM

Florist new york said:

<a href=" http://myblog.es/florist/ "> Florist new york</a>

http://myblog.es/florist/ Florist new york

# December 20, 2006 11:19 AM

zithromax z pak said:

Thanks!

[url=http://b5z1u.bubonka.org/]zithromax z pak[/url]

<a href=" http://b5z1u.bubonka.org/ ">zithromax z pak</a>

# December 24, 2006 3:22 PM

zyprexa said:

Thanks!

[url=http://zyprexa.blogcu.com/]zyprexa[/url]

<a href=" http://zyprexa.blogcu.com/ ">zyprexa</a>

# December 28, 2006 9:02 AM

Hi cool site friends! ,tom said:

Hi cool site friends!

,Hi cool site friends!

,Hi cool site friends!

# January 25, 2007 1:11 PM

Hi cool site friends! ,tom said:

Hi cool site friends!

,Hi cool site friends!

,Hi cool site friends!

# January 25, 2007 1:12 PM

rome italy said:

# January 31, 2007 10:20 AM
New Comments to this post are disabled
Page view tracker