Hi,
[ul][li]Using Microsoft Access 2010[/li]
[li]Not a Circular Reference error (ref1, ref2)[/li]
[li]Underlying recordsource is a Union Query.[/li]
[li]One of the 2 Unioned pieces uses COUNT() and MAX() functions[/li]
[li]I have IIF, COUNT, and MAX in one query, UNION to a basic SELECT query, then put that in a subquery, and ORDER the results.[/li]
[li]The query looks 100% fine when I open it in datasheet view. The error occurs in the form field. The other 2 fields show correctly on the form.[/li]
[li]Below is the underlying SQL creating the recordsource:
[/li]
[li]The field which gets the #NAME? error is LastUpdate[/li][/ul]
Thanks for any thoughts, suggestions, references.
[ul][li]Using Microsoft Access 2010[/li]
[li]Not a Circular Reference error (ref1, ref2)[/li]
[li]Underlying recordsource is a Union Query.[/li]
[li]One of the 2 Unioned pieces uses COUNT() and MAX() functions[/li]
[li]I have IIF, COUNT, and MAX in one query, UNION to a basic SELECT query, then put that in a subquery, and ORDER the results.[/li]
[li]The query looks 100% fine when I open it in datasheet view. The error occurs in the form field. The other 2 fields show correctly on the form.[/li]
[li]Below is the underlying SQL creating the recordsource:
Code:
SELECT *
FROM (
SELECT IIf(d.[UserName] Is Null,"NotWorked",d.[UserName]) AS Researcher,
Count(d.ResearchID) AS [Accounts],
Max(d.DateModified) AS LastUpdate
FROM qryResearchers_Data d
GROUP BY IIf(d.[UserName] Is Null,"NotWorked",d.[UserName])
UNION
SELECT "Total" AS Researcher, COUNT(ResearchID) AS [Accounts], Null AS LastUpdate
FROM qryResearchers_Data
) AS x
ORDER BY x.Researcher;
[li]The field which gets the #NAME? error is LastUpdate[/li][/ul]
Thanks for any thoughts, suggestions, references.