Results 1 to 4 of 4
  1. #1
    svcghost is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    38

    Can't get UPDATE query to work with Join inside

    Hey guys,



    I just can't get this query to work. I'm not sure what's wrong with it.


    Code:
    DoCmd.RunSQL ("UPDATE ec SET ObstructedView = EventPrep.Club_1_Check FROM " & vEventID & "_C ec 
    INNER JOIN EventPrep ON ec.EventID = EventPrep.EventID WHERE ec.SubscriberType='Club' OR ec.SubscriberType='Bar';")
    Any ideas?


    The error I get is telling me: "Syntax error (missing operator) in query expression '54fdsf' FROM EUC0412_C ec INNER JOIN EventPrep ON EUC0412_C.EventID = EventPrep.EventID

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    These action queries do not work if the record is ambiguous. Maybe this link can assist you: http://allenbrowne.com/ser-61.html

  3. #3
    svcghost is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    38
    I'm not quite sure how it is ambiguous. Is there any way I can clean up my query so it isn't unclear?

  4. #4
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    try this update syntax:
    update xxx inner join xxxx on xxxxx set x=y where......

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

Similar Threads

  1. Access Update with Join Problem
    By saascuba in forum Access
    Replies: 3
    Last Post: 11-03-2010, 01:20 PM
  2. Update statement with linked table join
    By Guigui in forum Queries
    Replies: 6
    Last Post: 09-17-2010, 04:47 AM
  3. I can't get a full outer join to work
    By Bobt1993 in forum Queries
    Replies: 3
    Last Post: 03-20-2010, 10:05 AM
  4. Replies: 3
    Last Post: 08-06-2009, 11:49 PM
  5. Update with LEFT JOIN
    By mcarthey in forum Access
    Replies: 1
    Last Post: 08-27-2008, 10:49 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