J
John W.
I'm developing a form based on the following query that joins a number
of tables on the field [Casenum]. I'm getting the error message that
"The specified field could refer to more than one table listed in the
FROM clause of your SQL statement."
Here's the SQL statement:
SELECT
CLIENTSW.CASENUM,
CLIENTSW.PCODE,
CLIENTSW.DOPEN,
CLIENTSW.FUNDSNUM,
CLIENTSW.DCLOSED,
CLIENTSW.RCLOSED,
CLIENTSW.IMPACT,
CLIENTSW.PHELPED,
CLIENTSW.RECOVERY,
CLIENTSW.MAINBENEFIT,
CLIENTSW.HANDICAPPED,
CLIENTSW.RECOVERYM,
CLIENTSW.AVOID,
CLIENTSW.AVOIDM,
CLIENTSW.GoodStory,
zNotes.Note1,
[clientsw]![cfname] & " " & [clientsw]![cmi] & " " & [clientsw]!
[cLNAME] AS [Client Name],
QOutcomes_for_checkboxes.[Achieved (Won)],
QOutcomes_for_checkboxes.[Partially Achieved (Mixed Result)],
QOutcomes_for_checkboxes.[Did Not Achieve (Lost)],
QOutcomes_for_checkboxes.Underserved,
[Qclosing codes for check boxes].[Counsel and Advice],
[Qclosing codes for check boxes].[Limited Service],
[Qclosing codes for check boxes].[Neg Settle wo Lit],
[Qclosing codes for check boxes].[Neg Settle w Lit],
[Qclosing codes for check boxes].[Admin Decision],
[Qclosing codes for check boxes].[Court Decision Uncontested],
[Qclosing codes for check boxes].[Court Decision contested],
[Qclosing codes for check boxes].[Court Decision Appeal],
[Qclosing codes for check boxes].Other,
[Qclosing codes for check boxes].[Extensive Services],
zMainBenefits.MAINBENEFITB,
zMainBenefits.MAINBENEFITC,
PBI.ATNUM, PBI.PBIHOURS,
SMEMBER.SINITIALS
FROM
(((((CLIENTSW
LEFT JOIN zNotes ON CLIENTSW.CASENUM = zNotes.CASENUM)
LEFT JOIN QOutcomes_for_checkboxes ON CLIENTSW.CASENUM =
QOutcomes_for_checkboxes.CASENUM)
LEFT JOIN [Qclosing codes for check boxes] ON CLIENTSW.CASENUM =
[Qclosing codes for check boxes].CASENUM)
LEFT JOIN zMainBenefits ON CLIENTSW.CASENUM = zMainBenefits.CASENUM)
LEFT JOIN PBI ON CLIENTSW.CASENUM = PBI.CASENUM)
INNER JOIN SMEMBER ON CLIENTSW.SNUM = SMEMBER.SNUM;
Any suggestions as to where I might be going wrong, and how I can fix
this? Thanks.
of tables on the field [Casenum]. I'm getting the error message that
"The specified field could refer to more than one table listed in the
FROM clause of your SQL statement."
Here's the SQL statement:
SELECT
CLIENTSW.CASENUM,
CLIENTSW.PCODE,
CLIENTSW.DOPEN,
CLIENTSW.FUNDSNUM,
CLIENTSW.DCLOSED,
CLIENTSW.RCLOSED,
CLIENTSW.IMPACT,
CLIENTSW.PHELPED,
CLIENTSW.RECOVERY,
CLIENTSW.MAINBENEFIT,
CLIENTSW.HANDICAPPED,
CLIENTSW.RECOVERYM,
CLIENTSW.AVOID,
CLIENTSW.AVOIDM,
CLIENTSW.GoodStory,
zNotes.Note1,
[clientsw]![cfname] & " " & [clientsw]![cmi] & " " & [clientsw]!
[cLNAME] AS [Client Name],
QOutcomes_for_checkboxes.[Achieved (Won)],
QOutcomes_for_checkboxes.[Partially Achieved (Mixed Result)],
QOutcomes_for_checkboxes.[Did Not Achieve (Lost)],
QOutcomes_for_checkboxes.Underserved,
[Qclosing codes for check boxes].[Counsel and Advice],
[Qclosing codes for check boxes].[Limited Service],
[Qclosing codes for check boxes].[Neg Settle wo Lit],
[Qclosing codes for check boxes].[Neg Settle w Lit],
[Qclosing codes for check boxes].[Admin Decision],
[Qclosing codes for check boxes].[Court Decision Uncontested],
[Qclosing codes for check boxes].[Court Decision contested],
[Qclosing codes for check boxes].[Court Decision Appeal],
[Qclosing codes for check boxes].Other,
[Qclosing codes for check boxes].[Extensive Services],
zMainBenefits.MAINBENEFITB,
zMainBenefits.MAINBENEFITC,
PBI.ATNUM, PBI.PBIHOURS,
SMEMBER.SINITIALS
FROM
(((((CLIENTSW
LEFT JOIN zNotes ON CLIENTSW.CASENUM = zNotes.CASENUM)
LEFT JOIN QOutcomes_for_checkboxes ON CLIENTSW.CASENUM =
QOutcomes_for_checkboxes.CASENUM)
LEFT JOIN [Qclosing codes for check boxes] ON CLIENTSW.CASENUM =
[Qclosing codes for check boxes].CASENUM)
LEFT JOIN zMainBenefits ON CLIENTSW.CASENUM = zMainBenefits.CASENUM)
LEFT JOIN PBI ON CLIENTSW.CASENUM = PBI.CASENUM)
INNER JOIN SMEMBER ON CLIENTSW.SNUM = SMEMBER.SNUM;
Any suggestions as to where I might be going wrong, and how I can fix
this? Thanks.