I have an Outlook Contact as an External Data linked table. I have a form that displays a listbox with names in one column and email addresses in another. For mail recipients not in the contact list I have two textboxes...One for the recipients name and another for the email address. I then have a button that concatenates an email string in the format that outlook uses. after formatting is completed I pop a messagebox offering to add the contact to outlook using the following code.
Code:
Private Sub AddToOutlook(Name As String, eMail As String)
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim firstName As String
Dim lastName As String
Set db = Application.CurrentDb
Set rs = db.OpenRecordset("OutlookContacts", dbOpenDynaset)
firstName = Split(Name, " ")(0) 'get the element before the space
lastName = Split(Name, " ")(1) 'get the element after the space
With rs
.AddNew
![Display name] = Name
![E-mail address] = eMail
![First] = firstName
![Last] = lastName
.Update
.Close
End With
Me.Requery
End Sub
It all seems straightforward enough but when the code is run I get the following dialog telling me I do not have the proper permissions.
Here is the form
Any idea of what kind of permissions are needed to edit a linked Outlook table?