Results 1 to 4 of 4
  1. #1
    enquiries is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Nov 2013
    Location
    Samoa
    Posts
    69

    Result in Query not showing because field not filled in. (Joined tables)

    Hi there,



    I have a query, that I have a criteria to show appointments in the past (< Date()) but one result doesn't show up although the appointment end date is a past date, it only shows up when I fill in a field that is in another table that is joined and part of the query. But there's no criteria there for it to not be null.

    A bit mixed up.

    Thanks for any help Much appreciated.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Does this query use INNER JOIN? INNER JOIN requires related records in both tables. Use LEFT or RIGHT (outer JOIN) instead.

    Post the query sql statement for analysis.
    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
    enquiries is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Nov 2013
    Location
    Samoa
    Posts
    69
    Yes, I thought that i had something to do with the join.........below is the SQL statement
    SELECT [Applicant Information].[First Name], [Applicant Information].[Last Name], BoardMemberPositions.Company, BoardMemberPositions.[Position Held], BoardMemberExperienceApplicant.[Date of Appointment], BoardMemberExperienceApplicant.[End Date of Appointment], BoardMemberPositions.StateOwnEnterprise, CompletedOrEndedBoardAppointments.[Reasons For Ended Appointment], CompletedOrEndedBoardAppointments.[Number of Directors in Company], CompletedOrEndedBoardAppointments.[Number of Employee in Company]
    FROM BoardMemberPositions INNER JOIN (([Applicant Information] INNER JOIN BoardMemberExperienceApplicant ON [Applicant Information].ApplicantID = BoardMemberExperienceApplicant.ApplicantID) INNER JOIN CompletedOrEndedBoardAppointments ON [Applicant Information].ApplicantID = CompletedOrEndedBoardAppointments.ApplicantID) ON BoardMemberPositions.DirectorshipExperienceID = BoardMemberExperienceApplicant.DirectorshipExperie nceID
    WHERE (((BoardMemberExperienceApplicant.[End Date of Appointment])<Date()));

    Is there anything else that using an outer join will effect besides this? Thanks again for your help

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    INNER or OUTER join, if there are multiple 1-to-many or many-to-many relationships in the query, results might not be what you want.
    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.

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

Similar Threads

  1. Replies: 8
    Last Post: 10-03-2013, 08:11 AM
  2. Replies: 2
    Last Post: 06-19-2013, 06:13 AM
  3. Multiple joins, avoiding cross joined result
    By richjhart in forum Queries
    Replies: 2
    Last Post: 09-17-2010, 09:32 AM
  4. Replies: 3
    Last Post: 07-16-2010, 12:32 PM
  5. Replies: 5
    Last Post: 08-07-2009, 05:23 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