G
Guest
I am using Access 2007 and trying to get a query to work well. It picks up a
date from a form but does not do it quickly. If on the other hand I put the
date (#10/4/2007#) in the criteria field instead of the
=[Forms].[Form1].[Text13], the query works fantastically. What is necessary
to get the query to use the date from the form and run quickly? I am looking
at 2 seconds versus 53 seconds for the query to run. It is accessing an ODBC
database either way. I have tried it as a select or make table query and it
doesn’t make any difference in the time. The Text13 box is unbound and is
formatted as a short date field and shows ‘10/4/2007’. Thank you for any
help!!
SELECT QWHAP_BAL_SHEET_TRANS.ACCEPTANCE_DT,
QWHAP_BAL_SHEET_TRANS.ACCTG_TRANS_CD,
QWHAP_BAL_SHEET_TRANS.BAL_SHEET_ACCT_NBR,
Sum(QWHAP_BAL_SHEET_TRANS.TRANS_AMT) AS SumOfTRANS_AMT INTO [PER RECEIPT RUN
TEMP]
FROM QWHAP_BAL_SHEET_TRANS
GROUP BY QWHAP_BAL_SHEET_TRANS.ACCEPTANCE_DT,
QWHAP_BAL_SHEET_TRANS.ACCTG_TRANS_CD, QWHAP_BAL_SHEET_TRANS.BAL_SHEET_ACCT_NBR
HAVING (((QWHAP_BAL_SHEET_TRANS.ACCEPTANCE_DT)=[Forms].[Form1].[Text13]) AND
((QWHAP_BAL_SHEET_TRANS.ACCTG_TRANS_CD)="CR" Or
(QWHAP_BAL_SHEET_TRANS.ACCTG_TRANS_CD)="NF") AND
((QWHAP_BAL_SHEET_TRANS.BAL_SHEET_ACCT_NBR)="AA01"));
date from a form but does not do it quickly. If on the other hand I put the
date (#10/4/2007#) in the criteria field instead of the
=[Forms].[Form1].[Text13], the query works fantastically. What is necessary
to get the query to use the date from the form and run quickly? I am looking
at 2 seconds versus 53 seconds for the query to run. It is accessing an ODBC
database either way. I have tried it as a select or make table query and it
doesn’t make any difference in the time. The Text13 box is unbound and is
formatted as a short date field and shows ‘10/4/2007’. Thank you for any
help!!
SELECT QWHAP_BAL_SHEET_TRANS.ACCEPTANCE_DT,
QWHAP_BAL_SHEET_TRANS.ACCTG_TRANS_CD,
QWHAP_BAL_SHEET_TRANS.BAL_SHEET_ACCT_NBR,
Sum(QWHAP_BAL_SHEET_TRANS.TRANS_AMT) AS SumOfTRANS_AMT INTO [PER RECEIPT RUN
TEMP]
FROM QWHAP_BAL_SHEET_TRANS
GROUP BY QWHAP_BAL_SHEET_TRANS.ACCEPTANCE_DT,
QWHAP_BAL_SHEET_TRANS.ACCTG_TRANS_CD, QWHAP_BAL_SHEET_TRANS.BAL_SHEET_ACCT_NBR
HAVING (((QWHAP_BAL_SHEET_TRANS.ACCEPTANCE_DT)=[Forms].[Form1].[Text13]) AND
((QWHAP_BAL_SHEET_TRANS.ACCTG_TRANS_CD)="CR" Or
(QWHAP_BAL_SHEET_TRANS.ACCTG_TRANS_CD)="NF") AND
((QWHAP_BAL_SHEET_TRANS.BAL_SHEET_ACCT_NBR)="AA01"));