Microsoft KB Archive/207771

{|
 * width="100%"|

ACC2000: Modifying Linked Outlook or Exchange Tables in Access

 * }

Q207771

-

The information in this article applies to:


 * Microsoft Access 2000

-

Moderate: Requires basic macro, coding, and interoperability skills.

SUMMARY
When you create a table in Microsoft Access 2000 that is linked to either a Microsoft Exchange folder or a Microsoft Outlook folder, there are system-imposed limits on what you can add, change, or delete. This article discusses those restrictions.

You can download Microsoft Access wizards that make it easier for you to link or import Exchange and Outlook folders. The Exchange and Outlook wizards are available, free of charge, from Microsoft's World Wide Web site at:

"http://www.microsoft.com/accessdev/a-free.htm" NOTE: The information in this article applies to linked tables only. If you import a Microsoft Exchange/Outlook table into your database, the limitations described in this article do not apply.

MORE INFORMATION
Linked Microsoft Exchange and Outlook data is best suited as a read-only reference or as lookup information in your database. For example, you can use the Global Address Book to look up e-mail names for message recipients, or you can use Calendar information to view existing appointments and identify schedule conflicts.

However, if you want to modify data in the linked table, the following sections discuss some of the limitations you may encounter.

Adding New Records
When you link an Exchange or an Outlook folder within your database, you have no choice of which fields to display in the table. The subset of fields that appear in your table are preprogrammed in the Microsoft Messaging driver (Msexch40.dll) that manages the connection between Microsoft Access and Exchange or Outlook.

When you add a new record to the table, some fields produce the following error message when you try to enter data:

Field FieldName is based on an expression and can't be edited.

You cannot update these fields in Microsoft Access; however, after you identify the fields, you can simplify your data entry by hiding those columns as follows:


 * 1) Open the linked table in Datasheet view.
 * 2) Place the insertion point in a column that does not allow updating.
 * 3) On the Format menu, click Hide Columns. Note that the column is no longer visible.
 * 4) Repeat steps 2 and 3 for each column that you want to hide.

To display the columns again:


 * 1) Open the linked table in Datasheet view.
 * 2) On the Format menu, click Unhide Columns.
 * 3) In the Unhide Columns dialog box, click to select the check box for those columns that you want to display again.

NOTE: You can also click to clear the check box for any columns that you want to hide.
 * 1) Click Close.

Also, if you want Microsoft Outlook to use a specific form to display your new record, you must enter the correct data in the Message Class field. The Message Classes for the standard Microsoft Outlook folders are:

     FOLDER      MESSAGE CLASS -  -      Calendar    IPM.Appointment Contacts   IPM.Contact Inbox      IPM.Note Journal    IPM.Activity Tasks      IPM.Task

Modifying Records
You cannot modify any records in a linked Microsoft Exchange or Outlook table. The Microsoft Messaging driver is designed only for reading existing records and adding new ones.

Deleting Records
When you delete a record from a linked Microsoft Exchange or Outlook table, the record is immediately and permanently deleted. You cannot use the Undo command to restore the record, and the record does not appear in the Deleted Items folder in Microsoft Exchange or Outlook.

Use caution and be sure that you really want to delete a selected record before you proceed.

You can work around this behavior in several ways:


 * If you are using Microsoft Access security in your database, you can set permissions for the linked table so that deleting records is not allowed. This safeguards against accidental deletion of a record at the table level.
 * If you are using a form based on a linked Microsoft Exchange or Outlook table, you can set the form's AllowDeletions property to False. This prevents anyone who uses the form from accidentally deleting a record; however, you can still delete records directly from the table or a query.
 * If you are using a form based on the linked table and you want to allow users to delete records, you can set the OnDelete property of the form to a macro or event procedure that prompts a user to confirm the deletion. For example, you could use the following code.

Additional query words: attach update can t

Keywords : kbinterop kbdta

Issue type : kbinfo

Technology :