?
Solved

Outlook Contact primary key for linked Access database

Posted on 2007-07-28
7
Medium Priority
?
1,506 Views
1 Endorsement
Last Modified: 2013-11-29
I'm makeing a simple order data base in Access with customer infromation from Outlook-contacts. I have linked Outook-contacts to an Access-Contacts database but need a primary key for the one-Customer to Many-orders relationship.  I cannot seem to add a primary key in the linked Access database.  How can I define a unique relationship or add a primary key to either Outlook or Access?
1
Comment
Question by:rbhmesqu
7 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 19585149
Hi, rbhmesqu.

I don't know of a way to add a primary key to the linked contacts table.  How about using a query to find all Access records that match the current contact's name?
0
 
LVL 93

Accepted Solution

by:
Patrick Matthews earned 1500 total points
ID: 19585280
Hello rbhmesqu,

A little under two years back I created a contact mgmt database for one of our managers.
I included a synchronization routine that worked something like this:

1) In Access, each contact had a record in the Contacts table, with an autonumber
primary key, and just a few key details like name, company, business phone, and
email

2) The Access db also had a parameters table that stored, among other things, the
date/time of the last sync

3) When I ran the routine, Access would use Outlook automation to enumerate the
ContactItems.  If it found a ContactItem with 'last modified date' greater than that
last sync date, then I updated the associated Access record.  To tie the ContactItem to
the Access record, I think I co-opted one of the little-used fields like User FIeld 1or
Customer ID to store the primary key value.  (And thus, a ContactItem with no data
for that field would be a new contact; I'd add that to the Access db, grab the primary
key value, and populate it in Outlook)

Unfortunately I doubt I ever backed up the application, and the computer I built it on
gave up the ghost a couple of months ago, so I cannot send it to you.  I can say it
was based on the Access template for contact mgmt.

Regards,

Patrick
0
 
LVL 75
ID: 19585290
" I cannot seem to add a primary key in the linked Access database."

Can you open the 'Access-Contacts database' ?  If ...you can open it, then you should be able to modify the table design / relationships as necessary to add a Primary key.

If for some reason you do not have 'access' to the MDB, then you cannot modify the design of tables 'remotely', ie ... in the linked table.

Can you open the MDB?

mx
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
LVL 93

Expert Comment

by:Patrick Matthews
ID: 19585303
MX,

Looks like the Asker is using an Exchange data store as a linked table.  That being
the case, you cannot alter the structure of the linked data store...

Patrick

Regards,

Patrick
0
 
LVL 75
ID: 19585311
Don't know ... guess we need him to tell us ...

This "" I cannot seem to add a primary key in the linked Access database." is a little ambiguous :-)

mx
0
 

Author Comment

by:rbhmesqu
ID: 19587023
Thank you all for your comments.
Yes I am using an Exchange data, I guess that explains why I can't modify the structure of the linked Access database.  I thought perhaps Outlook would somehow provide a unique field or something I could use for one.    I did try just importing the data instead of linking it, but now I have to figure out a way to import only new additions or changes to the Outtlook contacts data. Marthewspatrick seem to have a unique approach.
0
 

Expert Comment

by:danielshanahan
ID: 24386632
Regarding matthewspatrick's solution, is ContactItems a separate table?  If so, is it the same as the "parameters table"?  Also, what is "Outlook Automation"?

Thanks.

daniel
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question