R
requeth
Hello, I am trying to run a query inside of a query (the results of
one query feeds into another). My query1(pteamquerylookup) runs fine
and returns a single result, which is what I want. I then run query2,
which I have below, and it prompts me for data (which ends up being
the result of query1) instead of taking my results. I manually wrote
all of the query below except where I added in the nested query.
SELECT PAPERAUDIT_TABLE.PA_DCN, PAPERAUDIT_TABLE.PA_AUDIT_DATE,
PAPERAUDIT_TABLE.PA_APPLICANT_NAME
FROM PAPERAUDIT_TABLE
WHERE (((PAPERAUDIT_TABLE.PA_AUDIT_DATE)>=[Forms]![auditquery]!
[startdate] And (PAPERAUDIT_TABLE.PA_AUDIT_DATE)<=[Forms]![auditquery]!
[enddate]) AND ((PAPERAUDIT_TABLE.PA_QA_FX)=[pteamquerylookup]!
[AnalystID]) AND ((PAPERAUDIT_TABLE.PA_SPCT_FX)=[Forms]![auditquery]!
[npifxid]));
Am I nesting the query correctly? The query pteamquerylookup is open
and has a populated AnalystID when I run the query above, but it still
does not function properly. I've tried adding a [Query]! to it just to
see if that would help, but it did not change anything. I am running
Access 2000. Any help would be appreciated.
Thanks!
one query feeds into another). My query1(pteamquerylookup) runs fine
and returns a single result, which is what I want. I then run query2,
which I have below, and it prompts me for data (which ends up being
the result of query1) instead of taking my results. I manually wrote
all of the query below except where I added in the nested query.
SELECT PAPERAUDIT_TABLE.PA_DCN, PAPERAUDIT_TABLE.PA_AUDIT_DATE,
PAPERAUDIT_TABLE.PA_APPLICANT_NAME
FROM PAPERAUDIT_TABLE
WHERE (((PAPERAUDIT_TABLE.PA_AUDIT_DATE)>=[Forms]![auditquery]!
[startdate] And (PAPERAUDIT_TABLE.PA_AUDIT_DATE)<=[Forms]![auditquery]!
[enddate]) AND ((PAPERAUDIT_TABLE.PA_QA_FX)=[pteamquerylookup]!
[AnalystID]) AND ((PAPERAUDIT_TABLE.PA_SPCT_FX)=[Forms]![auditquery]!
[npifxid]));
Am I nesting the query correctly? The query pteamquerylookup is open
and has a populated AnalystID when I run the query above, but it still
does not function properly. I've tried adding a [Query]! to it just to
see if that would help, but it did not change anything. I am running
Access 2000. Any help would be appreciated.
Thanks!