Use of DSum, DCount, DLookup, etc in form after splitting

Q

QB

I was reviewing Tony's Performance FAQ and am trying to address point 'Use of
DSum, DCount, DLookup, etc in form after splitting' That said the link he
provides is broken. Before I reinvent the wheel, I thought I ask if/where
others had found good replacement functions?

I know and use Allen Browne's Elookup (great function)

But am interested in DSum, DCount,...

Also, for personal knowledge, why is native functions such as these slower
than user defined functions??? I find this very weird and MS has never fix
this in its' multiple versions ...?

Thank you,

QB
 
J

Jeanette Cunningham

I haven't heard or found that DSum and DCount are any slower after splitting
or slower than user defined functions.
These functions are very useful and often used - however if you have a lot
of these functions in a form, then maybe you need to look at your database
structure or include those fields in the recordsource of the form.

DCount is fast when you are using an indexed field such as checking the
count of the primary key of a table where certain criteria are met and those
criteria are also indexed.
If using a non-indexed field it would be slower.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
B

Bill Baker

DCount("[Receipt Number]","[Receipts]","[Closed]='No'")=0

this is condition, it worked in 2003, we just upgraded to Windows 2007 and ACCESS 2007. Now if only one line is entried it does not put the amount in the total line, but if more then one line it works fine. any suggests. thanks



QB wrote:

Use of DSum, DCount, DLookup, etc in form after splitting
19-Mar-10

I was reviewing Tony's Performance FAQ and am trying to address point 'Use o
DSum, DCount, DLookup, etc in form after splitting' That said the link h
provides is broken. Before I reinvent the wheel, I thought I ask if/wher
others had found good replacement functions

I know and use Allen Browne's Elookup (great function

But am interested in DSum, DCount,..

Also, for personal knowledge, why is native functions such as these slowe
than user defined functions??? I find this very weird and MS has never fi
this in its' multiple versions ...

Thank you

QB

Previous Posts In This Thread:

Use of DSum, DCount, DLookup, etc in form after splitting
I was reviewing Tony's Performance FAQ and am trying to address point 'Use o
DSum, DCount, DLookup, etc in form after splitting' That said the link h
provides is broken. Before I reinvent the wheel, I thought I ask if/wher
others had found good replacement functions

I know and use Allen Browne's Elookup (great function

But am interested in DSum, DCount,..

Also, for personal knowledge, why is native functions such as these slowe
than user defined functions??? I find this very weird and MS has never fi
this in its' multiple versions ...

Thank you

QB

I have not heard or found that DSum and DCount are any slower after
I have not heard or found that DSum and DCount are any slower after splittin
or slower than user defined functions
These functions are very useful and often used - however if you have a lo
of these functions in a form, then maybe you need to look at your databas
structure or include those fields in the recordsource of the form

DCount is fast when you are using an indexed field such as checking th
count of the primary key of a table where certain criteria are met and thos
criteria are also indexed
If using a non-indexed field it would be slower

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


Submitted via EggHeadCafe - Software Developer Portal of Choice
WPF Control?s Default Style or Template by Extending the WPF Designer in Visual Studio 2010
http://www.eggheadcafe.com/tutorial...g-the-wpf-designer-in-visual-studio-2010.aspx
 
D

Douglas J. Steele

Does Receipt Number have a value? If not, DCount isn't going to count it
(use DCount("*", ...) instead)

Also, is Closed actually a text field, or are you mistakenly comparing the
string 'No' to a boolean field?

If neither of those are the problem, please provide more details of how
you're using the DCount. The snippet you're showing will not put a total
anywhere: it should strictly return True or False.

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/djsteele
Co-author: "Access 2010 Solutions", published by Wiley
(no e-mails, please!)



Bill Baker said:
DCount("[Receipt Number]","[Receipts]","[Closed]='No'")=0

this is condition, it worked in 2003, we just upgraded to Windows 2007 and
ACCESS 2007. Now if only one line is entried it does not put the amount
in the total line, but if more then one line it works fine. any suggests.
thanks



QB wrote:

Use of DSum, DCount, DLookup, etc in form after splitting
19-Mar-10

I was reviewing Tony's Performance FAQ and am trying to address point 'Use
of
DSum, DCount, DLookup, etc in form after splitting' That said the link he
provides is broken. Before I reinvent the wheel, I thought I ask if/where
others had found good replacement functions?

I know and use Allen Browne's Elookup (great function)

But am interested in DSum, DCount,...

Also, for personal knowledge, why is native functions such as these slower
than user defined functions??? I find this very weird and MS has never
fix
this in its' multiple versions ...?

Thank you,

QB

Previous Posts In This Thread:

Use of DSum, DCount, DLookup, etc in form after splitting
I was reviewing Tony's Performance FAQ and am trying to address point 'Use
of
DSum, DCount, DLookup, etc in form after splitting' That said the link he
provides is broken. Before I reinvent the wheel, I thought I ask if/where
others had found good replacement functions?

I know and use Allen Browne's Elookup (great function)

But am interested in DSum, DCount,...

Also, for personal knowledge, why is native functions such as these slower
than user defined functions??? I find this very weird and MS has never
fix
this in its' multiple versions ...?

Thank you,

QB

I have not heard or found that DSum and DCount are any slower after
I have not heard or found that DSum and DCount are any slower after
splitting
or slower than user defined functions.
These functions are very useful and often used - however if you have a lot
of these functions in a form, then maybe you need to look at your database
structure or include those fields in the recordsource of the form.

DCount is fast when you are using an indexed field such as checking the
count of the primary key of a table where certain criteria are met and
those
criteria are also indexed.
If using a non-indexed field it would be slower.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


Submitted via EggHeadCafe - Software Developer Portal of Choice
WPF Control?s Default Style or Template by Extending the WPF Designer in
Visual Studio 2010
http://www.eggheadcafe.com/tutorial...g-the-wpf-designer-in-visual-studio-2010.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top