T
Tony Girgenti
Hello.
I'd like to know how to make this run faster when it uses only dates. I'm
open for any database field format changes, coding changes or query changes.
The tables are linked. TC suggested using "EXISTS" in place of "IN", but i
don't know to modify existing query to use "EXISTS".
I can't be the only one with this kind of a problem. If that were the case,
Access would not be such a popular product.
When i use the following string in a "DoCmd.OpenReport stDocName,
acViewPreview, , strWhere", it gives me the report i want:
"[COMPANY NAME] = 'A V H INTERIORS 4061' AND TempStatus.JOBNO In (SELECT
JOBNO FROM TempStatus WHERE WORKSTATION= '#2- RECEIVED' AND
[TempStatus].TIMESTAMP Between #01/01/2004# And #1/01/2054#)"
Yet if i use this string, it takes forever to get a report.
" TempStatus.JOBNO In (SELECT JOBNO FROM TempStatus WHERE WORKSTATION= '#2-
RECEIVED' AND [TempStatus].TIMESTAMP Between #01/01/2004# And #01/01/2054#)"
Here is the query that is the Record Source for the report.
SELECT DISTINCT TempStatus.WORKSTATION, TempStatus.TIMESTAMP,
TempStatus.JOBNO, [PENDING ORDERS].DESCRIPTION, [PENDING ORDERS].TARGET,
[PENDING ORDERS].[COMPANY NAME], [PENDING ORDERS].SIDEMARK, [PENDING
ORDERS].TIMESTAMP, [PENDING ORDERS].[NUMBER OF FABRICS], INSTALL.INSTALLER,
INSTALL.[INSTALL DATE], INSTALL.[INSTALL NOTES], INSTALL.WORKSTATION,
INSTALL.TIMESTAMP FROM ([PENDING ORDERS] LEFT JOIN TempStatus ON [PENDING
ORDERS].JOBNO=TempStatus.JOBNO) LEFT JOIN INSTALL ON [PENDING
ORDERS].JOBNO=INSTALL.[JOB NO] ORDER BY TempStatus.TIMESTAMP;
Any help would be greatly appreciated. Answers to problems and questions on
these forums are very much appreciated. Not only answers to my questions,
but to others also. I have learned so much from reading questions and
answers by others.
Thanks,
Tony
I'd like to know how to make this run faster when it uses only dates. I'm
open for any database field format changes, coding changes or query changes.
The tables are linked. TC suggested using "EXISTS" in place of "IN", but i
don't know to modify existing query to use "EXISTS".
I can't be the only one with this kind of a problem. If that were the case,
Access would not be such a popular product.
When i use the following string in a "DoCmd.OpenReport stDocName,
acViewPreview, , strWhere", it gives me the report i want:
"[COMPANY NAME] = 'A V H INTERIORS 4061' AND TempStatus.JOBNO In (SELECT
JOBNO FROM TempStatus WHERE WORKSTATION= '#2- RECEIVED' AND
[TempStatus].TIMESTAMP Between #01/01/2004# And #1/01/2054#)"
Yet if i use this string, it takes forever to get a report.
" TempStatus.JOBNO In (SELECT JOBNO FROM TempStatus WHERE WORKSTATION= '#2-
RECEIVED' AND [TempStatus].TIMESTAMP Between #01/01/2004# And #01/01/2054#)"
Here is the query that is the Record Source for the report.
SELECT DISTINCT TempStatus.WORKSTATION, TempStatus.TIMESTAMP,
TempStatus.JOBNO, [PENDING ORDERS].DESCRIPTION, [PENDING ORDERS].TARGET,
[PENDING ORDERS].[COMPANY NAME], [PENDING ORDERS].SIDEMARK, [PENDING
ORDERS].TIMESTAMP, [PENDING ORDERS].[NUMBER OF FABRICS], INSTALL.INSTALLER,
INSTALL.[INSTALL DATE], INSTALL.[INSTALL NOTES], INSTALL.WORKSTATION,
INSTALL.TIMESTAMP FROM ([PENDING ORDERS] LEFT JOIN TempStatus ON [PENDING
ORDERS].JOBNO=TempStatus.JOBNO) LEFT JOIN INSTALL ON [PENDING
ORDERS].JOBNO=INSTALL.[JOB NO] ORDER BY TempStatus.TIMESTAMP;
Any help would be greatly appreciated. Answers to problems and questions on
these forums are very much appreciated. Not only answers to my questions,
but to others also. I have learned so much from reading questions and
answers by others.
Thanks,
Tony