I'm having problems with this select statement:
SELECT
field1,
MIN(field2) AS MinOfField2,
(SELECT id FROM table2 WHERE something = MinOfField2) AS table2_id
FROM table1
GROUP BY field1
When I try to execute this query, access pops up a dialog asking me to enter the parameter value of 'MinOfField2'.
First I tried to use the aggregate function directly in the subquery, but that doesn't seem to be allowed either.
The closest existing question I could find is this one: Access alias in subquery