Inner Joins in Acess

Results 1 to 2 of 2

Thread: Inner Joins in Acess

  1. #1
    Join Date
    Dec 1969

    Default Inner Joins in Acess

    According to MS Access this SQL statement works fine:<BR>"SELECT * FROM (Contact LEFT JOIN Interest ON Contact.ID_Number = Interest.ID_Number) LEFT JOIN Referral ON Contact.ID_Number = Referral.ID_Number WHERE Contact.ID_Number=" & Contact_ID, strConn<BR><BR>and gives me the data I need to display in the page from all three tables.<BR><BR>When I try to write it out like this: &#060;%= objRS("Contact.First_Name") %&#062; for instace I get an error message that says:<BR><BR>ADODB.Recordset (0x800A0CC1)<BR>Item cannot be found in the collection corresponding to the requested name or ordinal.<BR><BR>Am I not requestiong this information in the right way to display it on a page? What is the right way to do this?<BR><BR>I am trying to put a form together where I can edit or update user information such as mailing address, phone # ect.<BR><BR>I only have the three tables but totaled they comprise almost 40 fields in the form. Do I need to specifiy evry field and its corresponding inner Join?<BR><BR>What I need is the easiest way to get the data from all three tables so I can display it on a page.

  2. #2
    Join Date
    Dec 1969

    Default RE: Inner Joins in Acess

    1) Don&#039;t use "SELECT *" - specify the columns.<BR>2) Any columns that have the same field name (different table names), alias them.<BR><BR>Craig.

Posting Permissions

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