Results 1 to 4 of 4
  1. #1
    G4Stech is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2014
    Posts
    2

    Update fields using a field trigger

    I don't know if this has been discussed here before or if this is the correct topic so please bear with me.



    I have two excel spread sheets I would like to merge into a single database. I have imported the primary spreadsheet into Access as a database and now would like to update selected fields from the second spreadsheet. They are both parts lists that have simillar data and I only want to change some fields, like description and price, using a common trigger.

    During the second spreadsheet import if part number 1001-01 is found in the database change the description field and price field to the value of the spreadsheet and flag the record that the data has been changed. Then, if the part number is not found, import the entire record into the database.

    I'm sure this can be done but I have never done it before.

    Thanks for your help.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Options:

    1. link to second spreadsheet
    Execute two SQL actions, - an UPDATE and an INSERT SELECT
    The UPDATE would involve an INNER JOIN of the two datasets.
    The INSERT would involve a Find Unmatched query to identify records in table 2 that are not in the primary.

    3. complex VBA code
    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
    G4Stech is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2014
    Posts
    2
    June7 thanks for the information however I think I'm in over my head. I'm able to do step1 after that I can't figure out how to even get to SQL much less run an UPDATE or INSERT SELECT. If I click Visual Basic everything is grayed out and there is nothing in the header bar that mentions SQL but the icon to move the data to an SQL Server.

    Unless someone is willing to tell me where to go from here to do this I guess I'll have to accept defeat and move on. Thanks again.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    SQL is the language of queries (Structured Query Language). Use the Access query builder. Access Help has guidelines on using.
    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: 8
    Last Post: 06-05-2014, 12:08 PM
  2. Replies: 5
    Last Post: 04-05-2013, 12:02 PM
  3. Replies: 11
    Last Post: 10-22-2012, 08:39 AM
  4. Replies: 2
    Last Post: 10-02-2012, 10:29 PM
  5. Replies: 2
    Last Post: 08-30-2012, 07:59 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