Ok, I have another problem with queries now. This time, I have this query:
Code:
SELECT Items.[Name (Ingredients)], GetCost([Name (Ingredients)]) AS Temp, IIf([Temp]>4,[Temp]+([Temp]*0.2),[Temp]+([Temp]*0.25)) AS [Selling Price]
FROM Items
Now this works fine. The problem is that I want to sort it by Selling price:
Code:
SELECT Items.[Name (Ingredients)], GetCost([Name (Ingredients)]) AS Temp, IIf([Temp]>4,[Temp]+([Temp]*0.2),[Temp]+([Temp]*0.25)) AS [Selling Price]
FROM Items
ORDER BY IIf([Temp]>4,[Temp]+([Temp]*0.2),[Temp]+([Temp]*0.25));
Now all of a sudden a message box pops up asks for a value for temp. This seems very strange, its like I ask it a question and it just asks me what the answer is?! This doesn't happen if I sort by the other 2 fields, but that's not what I want to do.
Any help would be appreciated, I hope its as simple as the last one.