+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Spammer
    Join Date
    02-26-2009
    Location
    U.S
    MS-Off Ver
    Outlook
    Posts
    67

    Transfering data from one table to another

    Hi everyone,

    I am new to Access so I apologize if this seems obvious. I am presently in the initial stages of a database and would like to do the following. I have 2 tables one called suppliers with (CompanyName, Adress, Phone, Fax, Website etc...) The other tables is a contacts table (standard contact template table) Now what I want is the following:

    I fill the info of one supplier in the table for "Company A" : CompanyName, Adress, Phone, Fax, Website

    I then want to add a contact that work for "Company A" in the contacts table. What I want now is that when i enter or select "Company A" in contacts table that the other relevant information i.e (CompanyName, Adress, Phone, Fax, Website etc...) fills in automatically

    Can anyone tell me how to do this?

  2. #2
    Forum Moderator ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2003 & 2010
    Posts
    1,797

    Re: Transfering data from one table to another

    Hi jesika,

    I need to make two assumptions about your database:

    - you have a primary key (CompanyID field) in your Company table; and
    - you don't have any Contacts that represent more than one Company at a time.

    1) If this is the case, then all you need to do is add a CompanyID field to your Contact table as a foreign key (but set data entry required to "no").

    2) Set a one-to-many relationship (in the relationship screen).

    3) Build a lookup query from the Company table. Use the ID field first, then any other info field you wish.

    4) Go back to your Contact table and set the CompanyID field (on the Lookup tab) Display Control to "Combo Box", and use your lookup query as your row source.

    Cheers,
    Docendo discimus.

    Please consider:
    • Thanking those who helped you. Click the reputation icon in the contributor's post and add Reputation.
    • Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0