sum([TakesTooLong])

J

Jesse Aufiero

Adding a textbox to the footer of my continuous form in order to provide a
total dollar figure for one of the columns has become problematic. Even
when the form is filtered to show only a few records, access takes a very
long time to calculate the total. A sql trace (the back-end db is on sql
server 2000) reveals that the database is being hit once for every record in
order to come up with the total. As a result, I'd like some advice on how
to do this another way...

I'm thinking that the best way to force access to handle the summing on the
client machine, is to make use of the recordsetclone method, and then simply
have my form code iterate through the rows in the clone to handle the
summing on the client machine. The trouble is, i don't know what event to
hook into to do this. I'll want to trigger the code each time the user
filters the form in a different way. I tried using the ApplyFilter event,
but this event fires BEFORE access retreives the new filtered recordset.
Any ideas? I'm open to other well thought out suggestions.

Thanks!
 
R

ruralguy via AccessMonster.com

Try the current event!

Jesse said:
Adding a textbox to the footer of my continuous form in order to provide a
total dollar figure for one of the columns has become problematic. Even
when the form is filtered to show only a few records, access takes a very
long time to calculate the total. A sql trace (the back-end db is on sql
server 2000) reveals that the database is being hit once for every record in
order to come up with the total. As a result, I'd like some advice on how
to do this another way...

I'm thinking that the best way to force access to handle the summing on the
client machine, is to make use of the recordsetclone method, and then simply
have my form code iterate through the rows in the clone to handle the
summing on the client machine. The trouble is, i don't know what event to
hook into to do this. I'll want to trigger the code each time the user
filters the form in a different way. I tried using the ApplyFilter event,
but this event fires BEFORE access retreives the new filtered recordset.
Any ideas? I'm open to other well thought out suggestions.

Thanks!
 

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