PDA

View Full Version : I would like to migrate data of contacts from ms outlook to ms Access?



wedd
10-28-2010, 05:09 AM
I have a list of contacts in ms outlook of which i would like to migrate their information into my ms access database. Can this be done using vba code? If so, how can this be done? Also I'd like to make sure that my administrator is unable to add a new contact onto my access database, unless that contact is on our ms outlook contacts list? Can this feature also be done? If so, how can this be done? Do any of you experts have sample code how this interesting function can be done?



Thanks for your solutions


:friends:

Imdabaum
10-28-2010, 07:07 AM
I don't have any sample code, but my guess is yes.
You can create a linked table in Access that points to your contacts list from Outlook.
Then you can query it and append it to a local table in Access.
In order to restrict contacts to the Outlook contact list, you might be able to do a DLookup on the Outlook list. If the name exists, add it to the Access table, else cancel the entry. It depends on how your Admin manages the contacts. Is it through a form, or does he have access directly to the tables?

wedd
10-28-2010, 07:10 AM
Yes, that's right...I've linked the tables. Do you know where I can find information about DLOOKUPS?

Imdabaum
10-28-2010, 08:02 AM
F1? Search DLookup.

orange
10-28-2010, 09:46 AM
If you link the Outlook Contacts to Access, and you refresh the link from time to time, your table in Access will reflect the data in Outlook. Why would you or the administrator want to update the Access table?

If you do the link, and in your Access database have a routine to refresh the link, then the table in Access will always reflect the data in Outlook. Any data added via Access routines would be overwritten by the data refreshed from Outlook.
At least that's the way I understand it.

Good luck.

Imdabaum
10-28-2010, 10:52 AM
If you link an Excel sheet into Access you can only have read access on the data.

So does anyone know if the Contact List from Outlook behaves like a linked Excel sheet? Or does it behave like a linked ODBC table that you can read and write from?

geekgirlau
10-31-2010, 07:52 PM
If you link an Excel sheet into Access you can only have read access on the data.

Isn't this what you would want though? Otherwise you have to synchronise data back and forth! Far simpler to have Outlook as your only update point for contact information.