Results 1 to 2 of 2
  1. #1
    NewMexicoNovice is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    May 2013
    Location
    Beautiful New Mexico
    Posts
    6

    Question Simple update Query fails between two tables in the same Access 2007 database

    Colleagues,



    I am trying to run a simple update query between two tables with identical field names in the same Access 2007 database (.accdb). The purpose of this query is to change the names of employees in the event they marry, etc.

    (As a simple test, I've been trying to change Smith, Bob to Smiths, Bob.)

    Sheet1 is the table with the new employee information. EEInfo is the table with old employee info. I am using Query Design to select the Update Query and here is a copy of the simple code in SQL View:

    UPDATE EEInfo INNER JOIN Sheet1 ON EEInfo.[Rep Name] = Sheet1.[Rep Name] SET Sheet1.[Rep Name] = [EEInfo].[RepName].

    (Rep ID is the primary key between the two tables)

    Once I press run, I do not receive any syntax error message. Instead I receive the expected "You are about to update 2608 rows." However, there is no update to the desired Smiths, Bob in the EEInfo table.

    I need a clue, please.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Is Sheet1 an import of Excel worksheet or is it a link to a worksheet?

    Why does this table have repetitive names? In a relational database the table would have only the Rep ID. There would be a Reps table with unique records for the Reps. Change the name in the Rep table and this change will be reflected in queries that join the related tables.
    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: 17
    Last Post: 05-02-2013, 11:34 AM
  2. Replies: 3
    Last Post: 01-08-2013, 11:51 AM
  3. [access 2007] Update Query And Function
    By Zoroxeus in forum Queries
    Replies: 4
    Last Post: 04-16-2012, 04:19 PM
  4. Active Tables and Access 2007 database
    By reyes_monika in forum Access
    Replies: 2
    Last Post: 04-29-2011, 09:14 AM
  5. Access 2010 fails where 2007 worked
    By dick in forum Access
    Replies: 3
    Last Post: 10-16-2010, 01:20 AM

Tags for this Thread

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