Please help!!! Tables

  • Thread starter Thread starter Alimbilo
  • Start date Start date
A

Alimbilo

I need a formula to Sum the fields of a different table to a form that needs
those data.

Example:

Form name: Books
Table1 (field: total books)
Table2 (fields: old books, new books)

In the Books form, I want Total Books from Table1 to be the Sum of table2
fields
 
Alimbilo,
start by creating a query using table2.
Put old books in the first column and new books in the second column.
In query design, right click on the query grid and choose Totals from the
list.
In the Group By row click the drop down list and choose Sum for both fields.
Switch to datasheet view to see the totals for each column.
Save the query.
Use this query to create a form using the forn wizard.

You should end up with 2 textboxes showing the sum for old books and new
books.

To see the total you can create a calculated field on the form.
Put an unbound text box on the form.
For its rowsource put an expression something like this:
=Sum(Nz([OldBooks],0) + Nz([NewBooks],0))

This text box should show the total number of all books.

Note: Replace OldBooks and NewBooks with the real field names from your
query.


Jeanette Cunningham -- Melbourne Victoria Australia
 
Back
Top