Problem with MS Access Left Join & VB6

Discussion in 'Visual Basic ( VB )' started by msrdjan1, Mar 30, 2010.

  1. msrdjan1

    msrdjan1 New Member

    Joined:
    Mar 30, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hello, sorry but my English is not so good.

    I developed some appliction in VB6 using SQL server 2000 database but now I have to using the same application with MS access 2003/2007 and there is some problem with query.

    These are some of my tables:

    AccountInfo
    -AccountNumber*
    -CompanyID
    -Employee
    -OtherPerson
    .
    .
    .
    Employee
    -employeeID*
    -firstName
    -lastName
    .
    .
    .
    Company
    -companyID
    -address
    -phone
    .
    .
    .
    Month
    -monthID
    -month


    This is the query what is working using SQL server very well but MS Access is not supporting it.

    SELECT AccountInfo.Number, Company.CompanyName,Employee.name,Month.month
    FROM AccountInfo inner join Month ON monthID=accountInfo.monthID
    LEFT JOIN Company ON accountInfo.companyID=company.companyID
    LEFT JOIN Employee ON accountInfo.employeeID=employee.employeeID
    WHERE.........

    Problem is that for every Account record you have info about company OR employee and NOT both together because INNER JOIN results with NULL. Info about Month we have for any AccountInfo records so INNER JOIN is working OK.

    Is anyone have some idea how to do that ?
    Thanks.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice