DCount

skinny220

New Member
Joined
Jan 10, 2015
Messages
34
I have a form with 3 Dcount expression basically counting the number of records from three different queries. Is there a way I can have the Dcounts run the biggest query first to speed up time vs all three DCount running at the same time.
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Don't know about that. Using Aggregate Queries may be an option.

Are you using Criteria in your DCOUNT calculations? If so, it may help to make sure that those fields are Indexed.

Otherwise, you may want to look at something like this:
MCount - Faster than DCount? - Access World Forums
 
Upvote 0
Joe,

I have the Dcount pulling the smallest value in the query and for some reason its taking over a minute to count 961 records. I will go back to the original table and index a few fields to see if that improves performance.
 
Upvote 0
Can you post your DCOUNT statement?
Do you have a Primary Key in your table?
 
Upvote 0
Joe will do but I think I found out the issue. I used the query wizard (below) to build a mismatch query, the query takes about to minute to calculate. I will go back and index the original table to see if it will help with performance.

SELECT [PBUSE CPL Q (SRRC)].LIN, [PBUSE CPL Q (SRRC)].SUBLIN, [PBUSE CPL Q (SRRC)].NSN, [PBUSE CPL Q (SRRC)].[NSN Nomenclature], [PBUSE CPL Q (SRRC)].PBIC, [PBUSE CPL Q (SRRC)].UIC, [PBUSE CPL Q (SRRC)].[SER|DETECT SN|REG|LOT|SYS NO]
FROM [PBUSE CPL Q (SRRC)] LEFT JOIN [MAT_SIT SN Q (SRRC)] ON ([PBUSE CPL Q (SRRC)].UIC = [MAT_SIT SN Q (SRRC)].UIC_HELP) AND ([PBUSE CPL Q (SRRC)].[SER NO] = [MAT_SIT SN Q (SRRC)].[SER NO])
WHERE ((([MAT_SIT SN Q (SRRC)].[SER NO]) Is Null))
ORDER BY [PBUSE CPL Q (SRRC)].LIN, [PBUSE CPL Q (SRRC)].UIC;
 
Upvote 0

Forum statistics

Threads
1,221,902
Messages
6,162,726
Members
451,782
Latest member
LizN

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top