Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Warning message required

Status
Not open for further replies.

NeilT123

Technical User
Jan 6, 2005
302
GB
Good Morning all.

I am not sure whether this should be on the report or query forum so I apologise if posted incorrectly.

I have a report which uses multiple queries.

One of the queries called qrySoilAnalysisMostRec(A2) is as follows

Code:
 SELECT tblSoilAnalysisResults.FieldCode, Max(tblSoilAnalysisResults.DateOfAnalysis) AS DateOfAnalysis, tblSoilAnalysisResults.AnalysisNumber, tblSoilAnalysisResults.UseResinNutBal, tblSoilAnalysisResults.pH, tblSoilAnalysisResults.PIndex, tblSoilAnalysisResults.KIndex, tblSoilAnalysisResults.MgIndex
FROM (tblFieldDetails INNER JOIN tblSoilAnalysisResults ON tblFieldDetails.FieldCode = tblSoilAnalysisResults.FieldCode) INNER JOIN tblSelect ON tblFieldDetails.FarmAccountNumber = tblSelect.FarmAccountNumber
GROUP BY tblSoilAnalysisResults.FieldCode, tblSoilAnalysisResults.AnalysisNumber, tblSoilAnalysisResults.UseResinNutBal, tblSoilAnalysisResults.pH, tblSoilAnalysisResults.PIndex, tblSoilAnalysisResults.KIndex, tblSoilAnalysisResults.MgIndex
HAVING (((tblSoilAnalysisResults.UseResinNutBal)=-1));

What I would really like is, if when opening the REPORT there is more than 1 incidence of [Fieldcode] in the above QUERY that a warning message is triggered.

Is it correct to issue the warning based at the query level or should it be based on the report? Does anyone have any suggestions on the best solution? All help very much appreciated.

 
I think I would be inclined to check, using DCount perhaps, before opening the report.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top