Results 1 to 8 of 8
  1. #1
    cory_jackson is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    4

    How to update table if linked ot text file

    How does one link to test files in such a way that when used in a query with an internal table I can update data in that table?



    Example: Say I have an ever-changing list of clients in an text file with a client ID (CID) and name which I link to in order to look up the clients name. I also have a table in the Db which has orders that has, among other fields a foreign key for CID. Now if I create a query for current order and try to link to the data in the text file my query and forms based on it are not updatable.

    Thanks!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Don't link by query join.

    Build a form/subform arrangement.
    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
    cory_jackson is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    4
    How's that?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    If I understand the data structure correctly:

    The linked text file is a list of clients, a unique record for each client ID.

    The table is orders with ClientID as a foreign key.

    Have main form bound to linked text file. Have a subform that is bound to the orders table. Use the subform container control Master/Child link properties to set link on ClientID. As you move through records on main form the subform records will synchronize. You can add/edit orders in the subform.
    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.

  5. #5
    cory_jackson is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    4
    That sounds very cumbersome. And I need to create derived fields and such. It just seems incredible that linking to text files would effectively freeze anything they touch. I appreciate that Access knows it can’t modify any of those records in the text files but it seems I should be able to tell it that the links are read only and not to worry about it.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Form/subform is a commonly used structure of database interface. Especially with one-to-many (your client/order data) and many-to-many relationships. Even when linked data source is not involved.
    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.

  7. #7
    cory_jackson is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    4
    Maybe I'm missing something. Could I have what appears as a single form for the user with fields from both?

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    The form/subform arrangement could appear as a single form to the user. Look at http://office.microsoft.com/en-us/ac...010098674.aspx

    By 'derived' fields you mean calculations?
    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: 3
    Last Post: 12-06-2011, 11:32 AM
  2. Linked file text/numeric filter performance
    By awc109 in forum Import/Export Data
    Replies: 0
    Last Post: 04-19-2011, 11:02 AM
  3. Replies: 1
    Last Post: 01-22-2011, 12:23 PM
  4. Replies: 0
    Last Post: 11-30-2010, 12:23 PM
  5. Replies: 3
    Last Post: 01-21-2010, 08:10 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