Results 1 to 4 of 4
  1. #1
    garygoodguy is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Apr 2013
    Posts
    4

    Saved Import for Table with Relationships


    Hi,

    I created a table by importing an excel sheet. I saved the import at the time. since the original import I have created two relationships between this table and others in the database. Now when I run my saved import I get a message saying I can't delete the table because it has one or more relationships. Is there anyway around this? I'm looking to autmate the imports on a monthly basis where the data gets overidden with my data each month.

    Cheers.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Did you set Enforce Referential Integriry? If so, try not setting. Then delete records but not the table and import records to existing table.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    garygoodguy is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Apr 2013
    Posts
    4
    Quote Originally Posted by June7 View Post
    Did you set Enforce Referential Integriry? If so, try not setting. Then delete records but not the table and import records to existing table.
    Have not set 'Enforce Referential Integrity'. This db will be maintained by an Admin user where I was hoping they could just open the db and run the saved imports for each of the half-a-dozen tables that require refreshing of data. But it appears having tables with relationships will not allow this? No?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Without enforcement of RI should be able to delete records then import into existing table. Hopefully won't result in orphans in related child table.

    The record deletion can be done in VBA with:

    CurrentDb.Execute "DELETE FROM tablename"

    Or I guess a macro could execute a saved DELETE query object.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 1
    Last Post: 11-28-2012, 01:01 PM
  2. Replies: 2
    Last Post: 08-09-2012, 04:15 AM
  3. Replies: 34
    Last Post: 05-19-2011, 06:29 AM
  4. Saved Import in Query
    By Kimbertha in forum Queries
    Replies: 1
    Last Post: 10-21-2010, 07:21 AM
  5. Replies: 9
    Last Post: 02-19-2010, 12:07 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