Results 1 to 2 of 2

Thread: Sql Help on recordset multiple table access

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2001
    Location
    Ireland
    Posts
    2

    Question

    I am having problems with getting an MSFlexigrid to show data from multiple tables at once.

    i am sure that the sql is to blame

    i need to reference firstname and lastname from a different table if the customer number matches with the account number

    SELECT ACNumber, OpenBalance, TransType, TransAmt, ClosingBalance, Date, FirstName, LastName From LoanAcHistory, Customer WHERE ((LoanAcHistory.CustomerNumber = LoanAccount.CustomerNumber) AND ('" & iAccSearch & "' = LoanAccount.ACNumber))
    ORDER BY Customer.LastName"

  2. #2
    Lively Member Dr_Evil's Avatar
    Join Date
    Mar 2000
    Location
    Columbus, OH
    Posts
    105
    You are missing the LoanAccount Table from your FROM clause. Also remove the " from your ORDER BY. Try that, let me know if you are still having problems.
    Dr_Evil
    Senior Programmer
    VS6 EE
    VS.NET EA

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width