Results 1 to 4 of 4
  1. #1
    merebag is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Sep 2016
    Posts
    19

    JOIN expression not supported

    I am slowly converting my Access ADP to DAO/Odbc linked Access 2013 to a 2012 SQL server. I have some problems when trying to join tables in a .runSQL access command. It comes back with a "JOIN expression not supported" error.

    Here is my code:

    With Access.DoCmd
    .RunSQL "INSERT INTO TempChildFind(ChildId, AcctId, CurrSite, SecSite, ThirdSite, PrimarySite, AuditId) " _
    & "SELECT RefChildID, AccountId, CurrentSite,SecondarySite, TertiarySite, BillingSiteID, " & AuditID & " " _


    & "FROM AccountChildReference " _
    & "INNER JOIN AccountMaster ON AccountId = acct_ID " _
    & "WHERE CurrentSite = " & Me.comboSelectSite & " Or " _
    & "SecondarySite = " & Me.comboSelectSite & " OR TertiarySite = " & Me.comboSelectSite & " ORDER BY " _
    & "AliasLName asc, AliasFName asc, AccountID asc
    End With

    This INSERT INTO/SELECT statement works fine when running it in SQL Management Studio, but gets the Join support error when running it in VBA.

    Should I be using the .runSQL docmd in this case?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    JOIN is the basis for ALL queries, it should work.

    Unless this is a false error and your SQL is incorrect.
    Load the sql into a query, it will help you correct it.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    ?? there is no double quote after the last asc ?? may just be a typo in the post

    Review the Currentdb.execute your sql here command as a replacement for RunSql

  4. #4
    merebag is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Sep 2016
    Posts
    19
    Thanks for the input. However, I did find what the problem was. In order to do the Join that I was doing, I had to fully qualify the names of the fields with the appended table name. So, AccountID became AccountChildReference.AccountId. Once I did that, it worked fine.


    Thanks

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

Similar Threads

  1. RIGHT join expression not supported?
    By ittechguy in forum Queries
    Replies: 3
    Last Post: 11-12-2015, 11:00 PM
  2. Join expression not supported
    By Bschmale in forum Access
    Replies: 23
    Last Post: 02-12-2015, 12:09 PM
  3. JOIN expression not supported
    By seageath in forum Access
    Replies: 2
    Last Post: 12-05-2011, 08:41 PM
  4. Join Expression not Supported
    By amegahed3 in forum Queries
    Replies: 6
    Last Post: 09-29-2010, 01:28 PM
  5. Join Expression Not Supported
    By ubsman in forum Queries
    Replies: 3
    Last Post: 04-30-2009, 08:36 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