Parameter pop up

mattgsh

New member
Local time
Today, 02:28
Joined
Jul 31, 2012
Messages
8
I am having trouble with stopping with the parameter popping up. I want to look up a particular value that is a result of a series of formulas. However If i put a value in the criteria cell of say "3", I get parameter pop up boxes asking me about individual values, which are different fields, in the equation in the field box above it. Why is it doing this? What am I doing wrong?
Apologies for the poor discription but I cann't reveal much more.
 
Sounds like you have something either misspelled or referring to something that doesn't exist. If it can't find what you have told it to look for (either in the criteria or field name) then it will pop that up. Check your stuff very carefully for any misspellings as that is the most common error for this.
 
Sounds like you have something either misspelled or referring to something that doesn't exist. If it can't find what you have told it to look for (either in the criteria or field name) then it will pop that up. Check your stuff very carefully for any misspellings as that is the most common error for this.

I thought that at first myself but I made the equation in the expression builder and it works if i don't put in a criteria value.
 
Post the SQL of the query (Open the query in design view and then go to SQL VIEW and copy and paste that here).
 
SELECT [Building information].[Building name], [Utility meter data].[Account number], [Electrical Monthly utility].[Date from], [Electrical Monthly utility].[Date to], IIf([Days 'to' passed]>[Days 'from' to end],[Month to],[Month from]) AS [Utility month], [DAte to]-[Date from] AS [Number of billing days], [Electrical Monthly utility].[Total kWh], [Electrical Monthly utility].Demand, [Electrical Monthly utility].[Utility cost], [Electrical Monthly utility].[Utility discount], [Electrical Monthly utility].[Third party cost], [Utility cost]-[Utility discount]+[Third party cost] AS [Total cost], Month([date from]) AS [Month from], Month([date to]) AS [Month to], Day(DateSerial(Year([Date from]),Month([Date from])+1,0)) AS [Days in the from month], Day(DateSerial(Year([Date to]),Month([Date to])+1,0)) AS [Days in the to month], Day([Date from]) AS [Days 'from' passed], [Days in the from month]-Day([date from]) AS [Days 'from' to end], [Days in the to month]-Day([date to]) AS [Days 'to' to end], Day([date to]) AS [Days 'to' passed], IIf([Month from]=[Month to],(([Total cost]/([Number of billing days]))*[Days 'from' passed])+(([Total cost]/([Number of billing days]))*([Days 'to' passed])),([Total cost]/[Number of billing days])*[Days 'from' to end])+(([Total cost]/([Number of billing days]-1))*[Days 'from' passed]) AS [Adjusted value], IIf([Days 'to' passed]>[Days 'from' passed],([Total cost]/[Number of billing days])*[Days in the to month],([Total cost]/[Number of billing days]*[Days in the from month])) AS [Real Adjusted value]
FROM (([Building information] INNER JOIN [Electrical Monthly utility] ON [Building information].[Contract number] = [Electrical Monthly utility].[Building name]) INNER JOIN [Utility meter data] ON [Building information].[Contract number] = [Utility meter data].[Building name]) INNER JOIN [Electrical Billing profile] ON ([Building information].[Contract number] = [Electrical Billing profile].Building) AND ([Utility meter data].[Meter ID] = [Electrical Billing profile].[Account #]);



I basicaly want to lookup all the values for the Utility month only.
 
Okay that explains it. You can't use the Aliases you are creating in this query in other calculations within that same query. So, if you want to use the aliases, you will need to save the query with just the first calculation which creates the alias you want to use and then use that query in another OR you need to just use the entire calculation.
 

Users who are viewing this thread

Back
Top Bottom