It seems like you did not post the latest SQL as it does not Join the
translation table to your cboClassification field ----
Edit it like this --
SELECT IIF(DMax("cboCommentClass", "qryParametersLast")=1,"SECRET NOFORN")
AS [Max Classification], tblComments.DOTLMPF_ChoiceFK,
tblComments.solution,........
Use [Max Classification] in the header.
--
KARL DEWEY
Build a little - Test a little
Here is the complete query string. It is a dynamic query so the
"Where" claus can be very complex
SELECT tblComments.DOTLMPF_ChoiceFK, tblComments.solution,
tblSolutionLocation.Solution_Location, tblBasicData.[Lesson IDPK],
tblPersonnel.[Last Name], tblCore.CoreCapability,
tblNumbered.Numbered_Fleet, tblDOTMLPF.DOTMLPF_Choices,
tblStatusChoices.Status, tblComments.Date_Entered,
tblBasicData.HyperlinkToLesson, tblComments.Review_Date,
tblBasicData.DateObserved, tblBasicData.Title,
tblComments.ClassificationFK
FROM tblStatusChoices INNER JOIN (tblPersonnel INNER JOIN (tblNumbered
INNER JOIN (tblDOTMLPF INNER JOIN (tblCore INNER JOIN (tblBasicData
INNER JOIN (tblSolutionLocation RIGHT JOIN tblComments ON
tblSolutionLocation.SollocfieldsPK=tblComments.Solution_LocationFK) ON
tblBasicData.[Lesson IDPK]=tblComments.Lesson_IDFK) ON tblCore.[Core
Capability IDPK]=tblBasicData.CoreCapabilityFK) ON tblDOTMLPF.[DOTMLPF
ID PK]=tblComments.DOTLMPF_ChoiceFK) ON
tblNumbered.NumberFleetPK=tblBasicData.NumberedFleetFK) ON
tblPersonnel.personnelPK=tblComments.Responsible_IndividualFK) ON
tblStatusChoices.StatusChoiceIDPK=tblComments.statusFK
WHERE DOTMLPF_Choices="Doctrine";
- Show quoted text -
Karl
Not sure I understand your last suggestion. Where does the IIF code
go- in the control source for text box in the header? And what is
reference to {Max Classification]? This code also seems awfully long
if I need to do it for each of my 5 possibilities
Went back to SQL and yes- the code did not save, I think I have it now
on the SQL for qryParametersLast
SELECT tblComments.DOTLMPF_ChoiceFK, tblComments.solution,
tblSolutionLocation.Solution_Location, tblBasicData.[Lesson IDPK],
tblPersonnel.[Last Name], tblCore.CoreCapability,
tblNumbered.Numbered_Fleet, tblDOTMLPF.DOTMLPF_Choices,
tblStatusChoices.Status, tblComments.Date_Entered,
tblBasicData.HyperlinkToLesson, tblComments.Review_Date,
tblBasicData.DateObserved, tblBasicData.Title, tblClass.Classification
FROM tblClass INNER JOIN (tblStatusChoices INNER JOIN (tblPersonnel
INNER JOIN (tblNumbered INNER JOIN (tblDOTMLPF INNER JOIN (tblCore
INNER JOIN (tblBasicData INNER JOIN (tblSolutionLocation RIGHT JOIN
tblComments ON
tblSolutionLocation.SollocfieldsPK=tblComments.Solution_LocationFK) ON
tblBasicData.[Lesson IDPK]=tblComments.Lesson_IDFK) ON tblCore.[Core
Capability IDPK]=tblBasicData.CoreCapabilityFK) ON tblDOTMLPF.[DOTMLPF
ID PK]=tblComments.DOTLMPF_ChoiceFK) ON
tblNumbered.NumberFleetPK=tblBasicData.NumberedFleetFK) ON
tblPersonnel.personnelPK=tblComments.Responsible_IndividualFK) ON
tblStatusChoices.StatusChoiceIDPK=tblComments.statusFK) ON tblClass.
[ClassID PK]=tblComments.ClassificationFK
I am then using the code
=IIF(Dmax(cboCommentClass, qryParametersLast)=1, SECRET NOFORN)
in the text box and am getting invalid syntax missing operator or
operand
Following your build a little, test a little- I like to test a lot
and as I am jus tlearning I really neeed to do a lot of testing so I
understand what is going on
Thanks for continued support
Dave