Ok, so in the attached DB, I'm trying to put the subrptIncInfo into the main report on a page break. I can do this. However, I've put the code in as a source for the subreport to pull information so that I can populate the listboxes with the actual Agent Names, Primary Squad, Primary Topic-of-Discussion but the code doesn't work and I can't figure it out.
If you view the subreport by itself, it displays the information the way that I want / need it to be but inserting the subreport shows blank information **ONLY** if I leave the code below OUT of the subreport source.
SELECT tblTopic.TopicID, tblTopic.ToDID, tblTopic.Occurred_On, tblTopic.PoCID, tblTopic.Attendees,
tblTopic.AgentID, tblTopic.Other_Agents, tblTopic.Primary_Squad, tblTopic.Other_Squads, tblTopic.Notes,
tblToD.ToDID, tblToD.Topic, tblAgent.AgentID, tblAgent.FirstNM, tblAgent.LastNM, tblSquad.SquadID,
tblSquad.SquadNM FROM tblToD LEFT JOIN (tblAgent LEFT JOIN tblTopic ON tblAgent.AgentID=tblTopic.AgentID)
ON tblSquad.SquadID=tblTopic.Primary_Squad) ON tblToD.ToDID=tblTopic.ToDID;
Ok, just looked at it again and still just don't see what you see George.
I'm trying to pull the following:
AgentID, AgentFN, AgentLN
SquadID, SquadNB, SquadNM
This is done so that on the subreport in the listboxes of:
Primary Topic of Discussion reads , in words, what the Primary Topic of Discussion of the Topic was.
Primary Agent reads, in words, what the First Name and Last Name of the primary contact agent is.
Primary Squad reads, in words, what the Squad Number and actual Squad Name are.
The thing that I'm perplexed about is if you open the subreport, the information is pulled correctly, just the way I want it.
If you insert the subreport in the main report, it doesn't pull those pieces of information into the listboxes. HOWEVER, it does pull the actual ID numbers into the textbox fields.
That's what's getting to me more than anything so I figured it was in the way that I wrote the listbox rowsource and data information?
I used the Query Designer and did the whole drag-and-drop deal. It produced the below SELECT statement which worked when I ran it but if I put it into the record source for the subreport, it still isn't showing unless I view the subreport by itself.
SELECT tblTopic.TopicID, tblTopic.ToDID, tblTopic.Occurred_On,
tblTopic.PoCID, tblTopic.Attendees, tblTopic.AgentID, tblTopic.Other_Agents,
tblTopic.Primary_Squad, tblTopic.Other_Squads, tblTopic.Notes, tblToD.ToD,
tblAgent.FirstNM, tblAgent.LastNM, tblSquad.SquadNB, tblSquad.SquadNM
FROM tblToD RIGHT JOIN (tblTopic INNER JOIN (tblSquad INNER JOIN tblAgent
ON tblSquad.SquadID=tblAgent.SquadID) ON
tblTopic.AgentID=tblAgent.AgentID) ON tblToD.ToDID=tblTopic.ToDID;
Well, I got it to work but not the way that I want it to work! I deleted the list boxes and just put in regular text boxes and it displays fine. Not what I really wanted cause I think it looks a little tacky. Oh well!
If anyone can figure out what I did wrong and let me know, so I can make it the way I really want to see it, please let me know.