Results 1 to 4 of 4
  1. #1
    Lorlai is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Posts
    107

    Update different records in a Linked Table


    I have an access 2007 table that is linked to a sharepoint site. This table contains data that is imported in from a weekly report. The data may change for each record (Product status may go from great one week to critical the next), and there may be new records that will need to be added. At the moment, all I can figure out is to completly delete the table data and start over, but can no longer do this as a user on the sharepoint site can update the information via the sharepoint. Such changes need to be maintained.

    Does anyone have any advice on how to do this? How can I update the record if there is new information?

    Thank you!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Run two SQL actions. One to update existing and one to add new records.
    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
    Lorlai is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Posts
    107
    Thanks for responding June7, I appreciate your help.

    I have pretty limited experience with SQL, and am not sure how to create an update statement when I do not know the data that will be updated. The examples I can find of an update statement is like this:
    Code:
    UPDATE Customers SET Areacode = "765" WHERE Zipcode="46135"
    How would I apply this if I didn't know if it would need to be updated? Like if the CustomerID, CustomerName, CustomerStreet were all the same, it was just the Zipcode that was wrong and needed to be updated based on the incoming data?

    Thank you!

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Somehow would have to detect which value is changed and construct the SQL statement appropriately. That, or just update every field even if nothing actually changed. How many fields are involved?

    Seems this is not really an Access question, but a web design issue. I have never used Sharepoint.
    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. automatically add records to linked table
    By bcrozier in forum Database Design
    Replies: 3
    Last Post: 04-07-2011, 09:03 PM
  2. Replies: 1
    Last Post: 01-22-2011, 12:23 PM
  3. Replies: 0
    Last Post: 11-30-2010, 12:23 PM
  4. Update statement with linked table join
    By Guigui in forum Queries
    Replies: 6
    Last Post: 09-17-2010, 04:47 AM
  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