Calculating the total on a form

A

Acc

Hi there

I have a database with the following main tables: Advertisers, Restaurants,
and placements

on the Placements form (subform), i have the following fields:

Advertiser
Restaurant
NoOfTables
TotalNoOfTables

How do i allow the "TotalNoOfTables" Field to calculate all the "NoOfTables"
amounts for all the records in that form?
 
G

George

Hello Melissa,

I am guessing that your subform is a continuous form. So, in the SubForm
Header you may add an unbound (textbox) with the formula: =sum([NoOfTables])

Hope this helps,

GeorgeCY

Ο χÏήστης "Acc" έγγÏαψε:
 
A

Al Campagna

Acc,
In this instance, do not save the results of a calculation, if that
calculation can be re-derived in any subsequent query, for, or report.
Get rid of your TotalNoOfTables field, as it is not needed, nor will it
work.

Given these sample records in your Placement subform...
Restaurant NoOfTables
Bob's Bistro 12
Mayflower 20

In the subform's Form Footer...
=Sum(NoOfTables)
will yield the correct total of tables for that set of subform records.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
T

Tom van Stiphout

Amounts? Not sure what you mean. I am assuming you mean the sum of the
NoOfTables values.
Place a textbox in the footer of the subform, and set the
ControlSource to:
=Sum(NoOfTables)

-Tom.
Microsoft Access MVP
 
A

Acc

Wonderful! Thank you very much

I got it perfect!

Now, i need to create a form which will be able to do searches.

it needs to be able to search "By Client", By contractNo, By Suburb?

any ideas?

Thank you kindly to everyone who has helped me thus far :)
 
A

Al Campagna

Acc,
There are several ways to do that, but...
On my website (below) in Access Tips, I have a 97 and 2003 sample file
called
Quick Find Combo. It demonstrates how to use a combo box to
find a specific record.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

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