Results 1 to 4 of 4
  1. #1
    bcrozier is offline Novice
    Windows Vista Access 2007
    Join Date
    Apr 2011
    Posts
    2

    automatically add records to linked table

    I'm new to Access and I just need to determine whether this can be done.



    I have one imported DBF table1 with basic customer info from an ERP system. I've linked it to a second table2 in Access that I populated with records by copying and pasting table1's ID column. The two tables are linked and I have a simple form with fields from both tables. I'd like to be able to maintain table2 with new user data but update tabe1 with a fresh import that might contain new records from the ERP. I want the new records to show on the form and automatically add to table2 so that the user can maintain table2 data for them. I've played with integrity enforcement and cascading fields but no luck. Can this be done in Access?

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    are you asking if you can import data OVER old data on the LEFT or RIGHT side of a relationship?? I assume these tables are related?? if they are, and the table that needs to be overwritten is on the RIGHT or CHILD side, you don't need to do anything. simply overwrite the old data.

    if it's on the left AND you've got RI enforced on your relays, they will need to be deleted via code or some other method before every import. Otherwise Access will give a message similar to:

    "x records were not imported due to ****** violations..."

  3. #3
    bcrozier is offline Novice
    Windows Vista Access 2007
    Join Date
    Apr 2011
    Posts
    2
    Thanks, I hadn't considered the possibility of Access making a fuss about me overwriting table1 (left.) Doesn't seem to be a problem though if I just delete the link first, delete table1, import new DBF, remake relationship.

    Another poster on another forum has given me a query to insert into table2 and it seems to work. Not quite as seamless as I had hoped for my non-tech user but I can give them a follow the bouncing ball that will do.

    Thanks again.

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    marked as solved. if you crosspost, tell us.

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

Similar Threads

  1. Replies: 0
    Last Post: 11-30-2010, 12:23 PM
  2. Change linked table reference automatically
    By kjuelfs in forum Access
    Replies: 1
    Last Post: 07-20-2010, 09:14 AM
  3. Replies: 3
    Last Post: 01-21-2010, 08:10 PM
  4. Replies: 2
    Last Post: 10-27-2009, 07:09 AM
  5. Replies: 2
    Last Post: 09-10-2009, 08:21 AM

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