Results 1 to 3 of 3
  1. #1
    mojopin is offline Novice
    Windows 10 Access 2013
    Join Date
    Jan 2016
    Posts
    2

    How to paste list of values to a table column with lookup cells


    Hi,

    I'm building my first Access database and have a newbie problem.
    I have two tables with geographical locations. All sub-regions in table 2 are contained in the regions in table 1.

    Table 1:
    [Region ID] [Region number] [Region name]

    Table 2:
    [Sub-region ID] [Sub-region number] [Sub-region name] [Region name]

    I've related the tables using the wizard, and created the [Region name] column as a "lookup-column" in Table 2. Everything seems fine. I can choose regions from the dropdown list in the fourth column of Table 2, and the chosen sub-regions then appear as a "child" of the chosen "parent" in Table 1.

    But as Table 2 consist of 20 000 sub-regions, I can't choose a region from the dropdown list for every record. But when pasting values to the fourth (the lookup) column of Table 2, I get the error:

    "You cannot add or change a record because a related record is required in Table 1".

    What am I doing wrong? All the regions I'm pasting already exist in Table 1 (i.e. I'm not adding new regions), and the formating is the same.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    you cant overwrite child key records if they have a parent.
    you can run an update query on the child's other fields, but not the keys

  3. #3
    mojopin is offline Novice
    Windows 10 Access 2013
    Join Date
    Jan 2016
    Posts
    2
    I'm not sure I understand. I guess my question in too elementary.

    There are currently no data in the column related to the parent table. How should I import data to this column for the first time? I can't be expected to choose a value from the dropdown list for all of the 20 000 records? Should I first import the values, and then relate the two tables?

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

Similar Threads

  1. Replies: 14
    Last Post: 07-13-2015, 12:47 PM
  2. Replies: 1
    Last Post: 09-11-2014, 05:53 AM
  3. Replies: 1
    Last Post: 09-09-2014, 02:01 PM
  4. Replies: 2
    Last Post: 08-22-2010, 01:42 PM
  5. Lookup values in one column from another record
    By cjayjones in forum Queries
    Replies: 16
    Last Post: 08-05-2009, 02:27 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