I'm trying to build a query that contains an overview of the rest of the database, as in has all the important information in it.
I need to display the max value for "impact" in the table "tImpact". I set up an expression as follows:
Please note that [tScenarios].[scenarioID] is also in the query. For some reason, when I go to datasheet view, it prompts me for a parameter for [tImpact]. This expression is the only place that the table [tImpact] appears in the query.Code:DMax([tImpact].[impact], [tImpact], [tImpact].[scenarioID] = [tScenarios].[scenarioID])
I'm also using a function to get a value for the query. The function calculates how much the Impact is reduced, which I already know is calculating properly, as its being used in a few other places as well. The final result is stored in a variable, "Ireduc", and I then set that to the function name.
I have another function giving values to the query that's set up the same way, and that one is working properly, but this one is displaying a 0 for every record. If it makes a difference, the working functions returns a string, and the one in question returns a double.Code:'Calculations... impactReduction = Ireduc Exit Function End Function
Let me know if any additional information is needed.
Any help is greatly appreciated!