In Access, need to add number fields & do percentage from other -h

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

Guest

I have create a table with a number of text and number fields. From this, I
have created a form.
Now from some of my fields (set as number), I need to add them up; this sum
should be in a new field and stored in the table.
I also need to do a percentage from some of these fields.

I am not very familiar with modules but know how to do it in Excel; is there
a way of doing this in Access?
 
You rarely need to store the results of a calculation in a database, and
never need to do so when all the elements of the calculation are already
stored. Using a form, report, or query, you can always recreate the result
of your calculation. On very large databases, with complex calculations,
sometimes an Insert (Append) query is used to build a temp table to run a
report or export data.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access
 
Karine said:
I have create a table with a number of text and number fields. From
this, I have created a form.
Now from some of my fields (set as number), I need to add them up;
this sum should be in a new field and stored in the table.

It is not likely it should be stored in a table. Rather it should be
recomputed each time you use it. Storing it is more likely to bog down
Access than re-computing it each time (I'll bet your Excel examples are also
re-computing). It also eliminates the problem that will result if one of
the source numbers is changed.

While you can do it on a form, for the most part it is easier to do it
in a query and then base the form on the query. You will then have the
query available for reports or other uses.

Base an new query on the table and display all the fields you need on
the form.

Do a right click on the column-field you want to sum and select the ? .

You can also do your percentages by selecting a blank column and adding
something like:

Nameofresult: [yourfieldname] * 0.25
 

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