Results 1 to 4 of 4
  1. #1
    libraccess's Avatar
    libraccess is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Location
    Napier New Zealand
    Posts
    129

    Subfrom without records prevents Main From record results

    I would have moved this question from queries but I could not see how to, I am really hoping to solve this one this weekend
    Attached sample of both a one subform and two subform MainForm.
    As you will see if the subform has no entry then the report will not display any results for that record.


    I have a DB with a two subform form and entries are likely to be in one or the other but not both.
    Unless there are entries in both nothing shows on the report.
    Thanks please
    looks like my r finger is quicker than my o finger, if only I could morf my froms to my forms

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Its because the report uses INNER JOIN in the RecordSource query. Use:

    SELECT tblSub1.*, tblSub2.*, tblMain.DateA, tblMain.TextA, tblMain.NumberA
    FROM (tblMain LEFT JOIN tblSub1 ON tblMain.ID = tblSub1.Sub1FK) LEFT JOIN tblSub2 ON tblMain.ID = tblSub2.Sub2FK;


    You could edit your post to fix typos.


    I did a Mod thing and moved your post to Reports but as it turns out, the issue was with the query structure. Issues are so often multi-faceted.
    Last edited by June7; 03-23-2012 at 06:36 PM.
    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
    libraccess's Avatar
    libraccess is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Location
    Napier New Zealand
    Posts
    129
    Solved Thanks You need to be renamed to June10 as in 10 out of 10
    I need to not rely on design view for queries and do a little study of SQL , right
    Tried to edit my typos but the Title would not budge

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Edits like that have to be done in Advanced post editor.

    Here is one site for tutorials on SQL http://www.w3schools.com/SQl/default.asp
    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: 3
    Last Post: 03-11-2012, 08:24 PM
  2. Null Value prevents showing any results
    By nick.h in forum Queries
    Replies: 10
    Last Post: 12-19-2011, 07:23 AM
  3. Validate Subfrom Data
    By mcktigger in forum Forms
    Replies: 2
    Last Post: 09-08-2011, 09:50 AM
  4. Replies: 1
    Last Post: 08-25-2011, 11:41 AM
  5. Replies: 1
    Last Post: 08-06-2011, 10:45 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