Why do you want to store this value in a table? Each time you added or
deleted a book, the amount stored in your table would be wrong. Usually,
calculated amounts (values which can be obtained by a function like adding,
etc) are displayed using queries or reports or even text boxes in forms.
That way, they will always be up to date.
The exception to this rule would be when human intervention sets the rules
eg bulk-bought items where the more a customer buys, the less he has to pay
per unit. Since the formula for working out the discount might change at a
future date, you may need to store the current discount in some way.
The usual way to store calculations would be
1. In a report listing your books
In the report footer, you would add a text box into which you would type
=Count(OldBooks) + Count(NewBooks)
If you needed, for example, to add up these figures at the end of each week,
you would ensure that your database contained a date field and then using
the Sorting Grouping feature to do this.
2. In a query.
You would create 1 query where you add a column which says
Books::[OldBooks]+[NewBooks].
Save and close this query
Click on it, in the database window, go to Insert Query.
Add the Books field to the query grid
Click the Totals button and choose Count
The query would give you the total numbers of books.
Refinements can be made to this so that you have the totals for each
day/week/year.
If you for some reason you do need to store the value in a table then, you
would do this by using Code to run an append or update query. You would then
need additional code if someone added or deleted a book, otherwise the
stored amount would be incorrect.
But before you start learning how to do this, just check your database
design to see if you need it.
Evi