Results 1 to 2 of 2
  1. #1
    Aasta is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    2

    Filling foreign key based on other fields

    I have:



    tblSites
    SiteID .. .. SiteLocationID

    tblLocations
    LocationID .. Town .. County

    I have an Excel document with ~700 sites on, but lists towns / counties, whereas I need a LocationID to put into my site. Is there any way to automatically pull the LocationID from my list of locations for each record in either Excel/Access? Or will I have to manually do this...

  2. #2
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You could automate it by using VBA code. Or you could do it in Excel, by filling in the locationiD for each row, then importing.

    It would help to see a few rows of data for each table to really give you an answer.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Filling in Fields
    By BigCat in forum Access
    Replies: 2
    Last Post: 05-19-2011, 02:02 PM
  2. Disable fields based on another.
    By scottay in forum Forms
    Replies: 0
    Last Post: 08-10-2010, 05:40 PM
  3. Update 2 fields based on where condition.
    By Confused in forum Access
    Replies: 2
    Last Post: 11-19-2009, 05:21 PM
  4. Replies: 1
    Last Post: 10-26-2007, 07:29 AM
  5. Auto filling form fields
    By adamch29 in forum Forms
    Replies: 1
    Last Post: 07-25-2007, 06:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums