Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    DMJ's Avatar
    DMJ is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Oct 2011
    Posts
    32

    Report from Query showing all table fields

    When I run a report from my query which is based on two tables, the report shows all the fields from one table and not the info from the requested field. I've attached snipits of what it looks like.

  2. #2
    rustynails is offline Novice
    Windows 8 Access 2007
    Join Date
    Jul 2013
    Posts
    25
    I think it's because you have 1:m relationship between the two tables...try changing the relationship to 1:1

  3. #3
    DMJ's Avatar
    DMJ is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Oct 2011
    Posts
    32
    But there are many persons who may belong to a gang, so shouldn't it be one to many.

  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,930
    Show the query SQL statement.

    What do you mean by 'requested field'? What data is not showing?
    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.

  5. #5
    DMJ's Avatar
    DMJ is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Oct 2011
    Posts
    32
    I would like a name of a gang to show then the members of the gang. Right now all the fields from the gang table show not the info under the Gang Name field.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    You did not provide the SQL statement as requested.

    Gang Name field doesn't even show anywhere in the image you posted.
    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.

  7. #7
    DMJ's Avatar
    DMJ is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Oct 2011
    Posts
    32
    SELECT tbl_Gang.Gang_Name, tbl_Person.[Inmate_CS#], tbl_Person.Person_LastName, tbl_Person.Person_FirstName, tbl_Person.Person_MiddleName, tbl_Person.Person_NickNames, tbl_Person.Gang_Level, tbl_Person.Notes
    FROM tbl_Gang INNER JOIN tbl_Person ON tbl_Gang.GangID=tbl_Person.GangID;

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    That all looks good. So guess only thing left to do is provide db for analysis. If you want, follow instructions at bottom of my post.

    BTW, advise against special characters/punctuation (underscore is exception) in names. Use Num or No instead of #.
    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.

  9. #9
    DMJ's Avatar
    DMJ is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Oct 2011
    Posts
    32
    Attachment 13779
    Attached is a zipped copy of data base, all data is made up.Attachment 13779

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    There is no report in that db. The qry_GangInmate works as designed but maybe want to change the JOIN type. Try:

    SELECT tbl_Gang.Gang_Name, tbl_Person.[Inmate_CS#], tbl_Person.Person_LastName, tbl_Person.Person_FirstName, tbl_Person.Person_MiddleName, tbl_Person.Person_NickNames, tbl_Person.Gang_Level, tbl_Person.Notes
    FROM tbl_Gang RIGHT JOIN tbl_Person ON tbl_Gang.GangID = tbl_Person.GangID;
    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.

  11. #11
    DMJ's Avatar
    DMJ is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Oct 2011
    Posts
    32
    Attachment 13781
    I've redone the report after making the change in the query as you suggested and the report still has the same problem.

  12. #12
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Now there is a report in the db. Change the control from listbox to textbox.
    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.

  13. #13
    DMJ's Avatar
    DMJ is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Oct 2011
    Posts
    32
    The control for the Gang Name in the query?

  14. #14
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    In the report.
    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.

  15. #15
    DMJ's Avatar
    DMJ is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Oct 2011
    Posts
    32
    Sorry, I know this must be simple for you but I don't see where that is an option within the Report. The Control Source properties takes me to formating/data options but not field properties.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 11
    Last Post: 07-25-2013, 11:34 PM
  2. Replies: 1
    Last Post: 06-26-2013, 09:17 AM
  3. Replies: 4
    Last Post: 05-14-2012, 06:10 PM
  4. Report showing non-visible fields
    By AKQTS in forum Forms
    Replies: 2
    Last Post: 09-21-2010, 09:40 AM
  5. Replies: 2
    Last Post: 04-29-2009, 11:50 AM

Tags for this Thread

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