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.
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.
I think it's because you have 1:m relationship between the two tables...try changing the relationship to 1:1
But there are many persons who may belong to a gang, so shouldn't it be one to many.
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.
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.
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.
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;
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.
Attachment 13779
Attached is a zipped copy of data base, all data is made up.Attachment 13779
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.
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.
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.
The control for the Gang Name in the query?
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.
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.