creating a total for an entire field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to create a total that counts the entire field and gives me a
grand total. I might just be missing a simple function or reading it wrong.
Can you help me?
This is what its about...
I have a bunch of different items, and have created a function that
calculated a number based off of a date. Each record has 2 dates that are
referenced. Anyways, certain years mean that a different service is required.
What i need is a function that will total all the numbers of the end result.
I only need the "Total Time" calculated but I keep missing that function.
Please help if you can, or if you need more info...

Thanks ahead for your time.
 
You don't explain what you are trying to total.

Tell us what a line looks like. Are there multiplt "numbers" in a give
record, or are you trying to total all the records? Are you in a query? A
report? A form? What data types are the fields we are totalling here?
 
Oh yeah, i almost forgot. Using the autototal button, or whatever its called,
doesnt do it. I use the sum and it just sums the items that are just like it,
but the numbers are based on years, which are different all over the place.
So im getting 3 different numbers as a result, but only want one big one.
Thanks again!
 
Okie Dokie, Im in a query, that has 5 fields, including the formula field.
"time:IIf(([h-test]+12=[Present Year?]),"30",IIf(([H-test]+6=[Present
Year?]),"20",IIf(([mfg date]+12=[Present Year?]),"30",IIf(([mfg
date]+6=[Present Year?]),"20","10"))))"
Thats the formula that i used to make the 5th field. The results are based
on the manufacturing date of an extinguisher, or the year that it was last
h-tested. The result is an approximate time (in minutes) that the next job
should take. I wanted a big total saying it should take a total of say 240
minutes, then i can just divide that by 60 and get a decent idea of the time
frame. Is that even possible? A pipe dream perhaps? Who knows... well
hopefully you. hahaha.. i think im going insane.
 
Stuart said:
Oh yeah, i almost forgot. Using the autototal button, or whatever its
called, doesnt do it. I use the sum and it just sums the items that
are just like it, but the numbers are based on years, which are
different all over the place. So im getting 3 different numbers as a
result, but only want one big one. Thanks again!

I am not at all sure what you have. Some actual samples might be good,
but I am almost 100% you have a poor table design. It sounds like you
should be using some related tables rather then cram everything into one.
That is the beauty of a relational database. BTW storing the results of a
calculation is almost always a bad idea as well for several reasons.
 
Well, if you could maybe give some tips on a better design that would be
great. This is the first database that I am working on. It is for a company
that services fire extinguishers for a lot of different customers. We take
information on hundreds of extinguishers. For each one we have the location,
the type, manufacturer, serial #, Chemical type, manufacture date, last
6-year service and last hydrotest. All this information is needed for
accurate records. I have already designed it so automatically determine what
the next service will be according to what the mfg date or last h-test was. I
am trying to find a way to make a timetable that tells me how long each job
will take. For that i related what type of service it will be, but just cant
find a way to total all that up. Am I just missing some key component, is
this possible, or am i just going about this all the wrong way? Someone out
there has to know!!! Thanks guys/girls.
 
Stuart said:
Well, if you could maybe give some tips on a better design that would
be great. This is the first database that I am working on. It is for
a company that services fire extinguishers for a lot of different
customers. We take information on hundreds of extinguishers. For each
one we have the location, the type, manufacturer, serial #, Chemical
type, manufacture date, last 6-year service and last hydrotest. All
this information is needed for accurate records. I have already
designed it so automatically determine what the next service will be
according to what the mfg date or last h-test was. I am trying to
find a way to make a timetable that tells me how long each job will
take. For that i related what type of service it will be, but just
cant find a way to total all that up. Am I just missing some key
component, is this possible, or am i just going about this all the
wrong way? Someone out there has to know!!! Thanks guys/girls.

You can look up additional information about this in the help file or
books on databases or Access. It is called "normalization."

That sounds like you should have three tables.

* Customer Table:

The customer table will list each customer and the customer's
information. That is likely to include address, contact person, etc. Only
information about the customer and not repeating information, like a list of
fire extinguishers.

* FireExtinguishers Table:

This table will list each fire extinguisher with information about
it, like location maybe date installed, type, capacity etc.

* Service Table:

The service table will include each service performed the date time
materials used etc.

Each table is related to another table. With the information arranged
like this, it is easy to use a form - subform so you can call up a customer
and see a list of all their fire extinguishers and if you like the last date
the service was performed. Using the same idea will allow you to call up
all the services done to any one fire extinguisher. It also will make your
database smaller and faster.

You particular needs may call for more tables or a slightly different
design or maybe even fewer tables (if for example you only kept the last
service on your records.)
 

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

Back
Top