Please help!!! Tables

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
 
J

Jeanette Cunningham

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
 

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

Top