Thank you for considering this problem.
This database keeps records for a clinic.
Fees are tracked by CaseID.
A case can include more than one client, a client receiving
a variety of services can have more than one case.
My report LedgerByCaseID gives ledger information for a
given case. Since the client of this case could be involved
in other cases, I created a subreport, OtherCases, that retrieves
CaseID and case name for such additional cases, if any.
There is a junction table to handle the many to many relationships
among cases and clients.
The query source of the subreport works fine. The subreport,
when opened separately and a CaseID entered, works fine. When I open
the report LedgerByCaseID, the subreport shows case information
only for the case whose ledger is displayed.
I have another subreport on the report that's working fine, and I have
compared its properties to the OtherCases subreport, looking for clues,
but everything appears to be the same.
Here's the query:
SELECT t_JunctionCaCl.CaseID, t_Cases.CaseName, t_Clients.ClientID
FROM t_Cases INNER JOIN (t_JunctionCaCl LEFT JOIN t_Clients ON t_JunctionCaCl.ClientID = t_Clients.ClientID) ON t_Cases.CaseID = t_JunctionCaCl.CaseID
WHERE (((t_Clients.ClientID)=(select ClientID from t_JunctionCaCl where t_JunctionCaCl.CaseID = Reports![r_LedgerbyCaseID]![CaseID_txt] )));
Can anyone suggest why this works as a stand alone when I type
in a CaseID, but malfunctions in the report?
Thanks
Lila
This database keeps records for a clinic.
Fees are tracked by CaseID.
A case can include more than one client, a client receiving
a variety of services can have more than one case.
My report LedgerByCaseID gives ledger information for a
given case. Since the client of this case could be involved
in other cases, I created a subreport, OtherCases, that retrieves
CaseID and case name for such additional cases, if any.
There is a junction table to handle the many to many relationships
among cases and clients.
The query source of the subreport works fine. The subreport,
when opened separately and a CaseID entered, works fine. When I open
the report LedgerByCaseID, the subreport shows case information
only for the case whose ledger is displayed.
I have another subreport on the report that's working fine, and I have
compared its properties to the OtherCases subreport, looking for clues,
but everything appears to be the same.
Here's the query:
SELECT t_JunctionCaCl.CaseID, t_Cases.CaseName, t_Clients.ClientID
FROM t_Cases INNER JOIN (t_JunctionCaCl LEFT JOIN t_Clients ON t_JunctionCaCl.ClientID = t_Clients.ClientID) ON t_Cases.CaseID = t_JunctionCaCl.CaseID
WHERE (((t_Clients.ClientID)=(select ClientID from t_JunctionCaCl where t_JunctionCaCl.CaseID = Reports![r_LedgerbyCaseID]![CaseID_txt] )));
Can anyone suggest why this works as a stand alone when I type
in a CaseID, but malfunctions in the report?
Thanks
Lila