Results 1 to 11 of 11
  1. #1
    Hossein's Avatar
    Hossein is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Oct 2018
    Posts
    24

    Query Error => Join expression not supported

    My dear friends
    I am creating a report in access. source of this report is a query but i have an error during creating my query. When i add Bank table to my query, i faced by Join expression not supported error but I couldn't find reason of error.


    Would you help me please!


    Click image for larger version. 

Name:	Query Error.jpg 
Views:	18 
Size:	132.2 KB 
ID:	36224

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Joins should be on primary/foreign key fields. None of the links include a primary key field.

    Can a supplier have only one bank?
    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
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    You are using outer joins but the direction isn't consistent.
    If you need that arrangement try removing the Bank table and save your query.
    Then create a new query based on the saved query and add the Bank table to that.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  4. #4
    Hossein's Avatar
    Hossein is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Oct 2018
    Posts
    24
    Quote Originally Posted by June7 View Post
    Joins should be on primary/foreign key fields. None of the links include a primary key field.

    Can a supplier have only one bank?
    I set PK on Supplier code in table Supplier , but error dose not fix.
    Also in supplier table, suppliers code is unique. this means that, once supplier in supplier table has several bank account.

    Click image for larger version. 

Name:	pk1.jpg 
Views:	14 
Size:	104.7 KB 
ID:	36226

  5. #5
    Hossein's Avatar
    Hossein is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Oct 2018
    Posts
    24
    Quote Originally Posted by ridders52 View Post
    You are using outer joins but the direction isn't consistent.
    If you need that arrangement try removing the Bank table and save your query.
    Then create a new query based on the saved query and add the Bank table to that.
    I used your method and it's Working.
    Big thanks.

    Click image for larger version. 

Name:	Query ok.jpg 
Views:	13 
Size:	104.2 KB 
ID:	36227

  6. #6
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Not quite correct.
    You have what is called a Cartesian join AKA no join query.
    This will give one record for every combination of records from each table.
    So if PO Supplier has 200 records and Bank has 40, your query will have 200x40=8000 records

    Reinstate the join on the Supplier_Code field
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  7. #7
    Hossein's Avatar
    Hossein is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Oct 2018
    Posts
    24
    Quote Originally Posted by ridders52 View Post
    Not quite correct.
    You have what is called a Cartesian join AKA no join query.
    This will give one record for every combination of records from each table.
    So if PO Supplier has 200 records and Bank has 40, your query will have 200x40=8000 records

    Reinstate the join on the Supplier_Code field
    Dear ridders52
    I make relationship as you say and my query give one record.


    Click image for larger version. 

Name:	Query2.jpg 
Views:	10 
Size:	117.2 KB 
ID:	36242



    Note: I mentioned one supplier can several bank account in bank table
    Many thanks for your help

  8. #8
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Not sure if you're saying that is the desired outcome.
    If not, bear in mind that ....

    Previously you had one outer join to the Bank table.
    Now you have two inner joins.
    Try joining on account number only (if those really are unique) and try an outer join
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  9. #9
    Hossein's Avatar
    Hossein is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Oct 2018
    Posts
    24
    Quote Originally Posted by ridders52 View Post
    Not sure if you're saying that is the desired outcome.
    If not, bear in mind that ....

    Previously you had one outer join to the Bank table.
    Now you have two inner joins.
    Try joining on account number only (if those really are unique) and try an outer join
    I removed supplier_code join and by one relationship (Account number join) it is working.

    Click image for larger version. 

Name:	Query 3.jpg 
Views:	9 
Size:	111.0 KB 
ID:	36248


    Is this join outer join ? if I am wrong to make outer join, could you do that for me ? (I can upload Access file for you)

  10. #10
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Hi Hossein
    No its an inner join which means the query output only contains records that are in both tables.
    That may well be what you want - only you can tell by looking at the results.
    However its easy enough for you to test.

    I've created a quick guide to the different join types as a zipped word doc (attached)

    Hope that helps
    Attached Files Attached Files
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  11. #11
    Hossein's Avatar
    Hossein is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Oct 2018
    Posts
    24
    Quote Originally Posted by ridders52 View Post
    Hi Hossein
    No its an inner join which means the query output only contains records that are in both tables.
    That may well be what you want - only you can tell by looking at the results.
    However its easy enough for you to test.

    I've created a quick guide to the different join types as a zipped word doc (attached)

    Hope that helps
    Thank you very much for taking the time to help me.

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

Similar Threads

  1. Replies: 3
    Last Post: 09-20-2017, 09:50 AM
  2. JOIN expression not supported
    By merebag in forum Access
    Replies: 3
    Last Post: 09-19-2016, 04:21 PM
  3. RIGHT join expression not supported?
    By ittechguy in forum Queries
    Replies: 3
    Last Post: 11-12-2015, 11:00 PM
  4. Help with Error: Join Expression Not Supported
    By gammaman in forum Queries
    Replies: 1
    Last Post: 07-30-2013, 02:08 PM
  5. Join Expression Not Supported
    By ubsman in forum Queries
    Replies: 3
    Last Post: 04-30-2009, 08:36 PM

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