If .Show = -1 Then
txt.Value = CStr(fd.SelectedItems.Item(1))
Else
Debug.Print “User pressed Cancel”
End If
End With
On Error Resume Next
DoCmd.RunCommand acCmdSaveRecord
ErrorHandlerExit:
Exit Sub
ErrorHandler:
MsgBox “Error No: “ & Err.Number _
& “; Description: “ & Err.Description
Resume ErrorHandlerExit
End Sub
Comparing Outlook and Access Contacts..........................................................................
The Select Form combo box on the main menu (Figure 11.7) lets you select three forms, two of
which compare Access and Outlook data. One of the data comparison forms is sorted by Contact
ID and the other by contact name (sorting by name is useful for matching Access and Outlook
contacts when the Outlook contact lacks a value in the CustomerID property).
Outlook contact items have a number of very useful built-in ID fields, which for some
inexplicable reason are not displayed on the standard Contact item. The CustomerID
field is the one I use to link Outlook contacts to Access records in tblContactInfo (using the key field
ContactID). The GovernmentIDNumber field (corresponding to GovernmentID in tblContactInfo) can
be used to store a Social Security Number (for the United States) or the equivalent government ID
number for other countries. There is also another field useful for storing a company ID:
OrganizationalIDNumber, corresponding to CompanyID in tblCompanyInfo.
To test synchronizing Contacts data, make a new Contacts folder and copy some (or all)
of your contacts to it from your regular Contacts folder; that way, you can experiment
with making various changes without messing up your real contact data.
TIPTIP
NOTENOTE
Synchronizing Access and Outlook Contacts 11