adding a record

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

Guest

is there a way to have access do a calculation to a single record ?

basically field + field + field = have the results post in a field? or page
or email?. ive looked high and low and suspect that im just not finding the
source.
 
Sure. On you form or report, place an unbound textbox and put the following
in it....

= [SomeField] + [SomeField] + [SomeField]


In a query, you would place the following in a blank column...

NewCalculatedName: [SomeField] + [SomeField] + [SomeField]



Hope that helps,

Rick B
 
Yes you normally do this in a query or form or report.

In a query your might write "TotalSale: [field1] + [field2] .. +[field
x]" This will return the total. A similar form can be used in forms or
reports or usually the form or report is based on the query.

You don't want to store the totals as Access prefers to do the
calculation on the fly and if anything changes it will be updated at once.
 
when i try to create a report/form or query i get a error saying to may
fields. i am trying to add/cal approx 100 fields in a single record in the
table mode. basically
field1 + field2+3+4+5+6 100 times = a total
 
tmoore said:
when i try to create a report/form or query i get a error saying to
may fields. i am trying to add/cal approx 100 fields in a single
record in the table mode. basically
field1 + field2+3+4+5+6 100 times = a total

A hundred fields??? It sure sounds like you may need to take a good
look at your table design. It sounds like you need to normalize. Anytime
you have repeat the same type of information in multiple fields in a single
record you should stop and consider the problem.

You may have a phone number fax number address, business address for
each person and fields for all of those, but you would not normally have 20
fields for recording letters or telephone calls to that person. They would
be stored in another table (like phone call table) for just telephone calls
and related to the individual in the person table.
 
Your data design is flawed as far as Access is concerned. On the other
hand, it would work just fine in Excel just as you've described it.

Each of those fields you're trying to add together should really be
rows/records in a table. The parent table should be about the entity in
your row header to the left That table would have a primary key and a few
fields regarding the entity.. The child table would have its own primary
and would have a Long Integer, Foreign Key entry which is the primary key of
the parent table.

With your new data you can now create Totals queries that will do exactly
what you want. You might lurk microsoft.public.access.gettingstarted and
microsoft.public.access.tablesdesign to get some ideas about proper table
design.

HTH
 

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