PC Review


Reply
Thread Tools Rate Thread

Calculating totals problem on a form

 
 
=?Utf-8?B?R2Vycnk=?=
Guest
Posts: n/a
 
      4th Mar 2005
Hi

I have a simple database that provides quotations for work to be undertaken.
There is only one table containing all the fields. On the nain form I have
four fields: Price, Price2,Price3 and Price4 to allow for up to four
different pieces of work on one quote. I want to be able to total the costs
of each of the four elements and display as a total figure on the form.

I have used Total=Sum([Price]+[Price2]+[Price3]+[Price4]). This works,
however, it totals the cost of ALL the figures in all the records and I just
want the total for each individual record to display on the form of that
record.

many thanks for any suggestions.
 
Reply With Quote
 
 
 
 
Rick B
Guest
Posts: n/a
 
      4th Mar 2005
Then just add an unbound text box in the DETAIL section of the form to the
right of your other fields. Put something like the following in the
field...

==[Price]+[Price2]+[Price3]+[Price4]


Rick B



"Gerry" <(E-Mail Removed)> wrote in message
news:09704CA6-64C6-4D20-9C91-(E-Mail Removed)...
> Hi
>
> I have a simple database that provides quotations for work to be

undertaken.
> There is only one table containing all the fields. On the nain form I

have
> four fields: Price, Price2,Price3 and Price4 to allow for up to four
> different pieces of work on one quote. I want to be able to total the

costs
> of each of the four elements and display as a total figure on the form.
>
> I have used Total=Sum([Price]+[Price2]+[Price3]+[Price4]). This works,
> however, it totals the cost of ALL the figures in all the records and I

just
> want the total for each individual record to display on the form of that
> record.
>
> many thanks for any suggestions.



 
Reply With Quote
 
Larry Daugherty
Guest
Posts: n/a
 
      5th Mar 2005
Hi Gerry,

You asked for suggestions. Be careful what you wish for ... :-)

Start over and redesign your database application by the rules.

You have designed your database as though an Excel spreadsheet were the
template for a database. It isn't. In Excel it's common to just add
another column when you have repeating data of the same type: Price1,
Price2, Pricen. That's a clear indication that you need another table for
Price.

Your application has more than one entity. Here I'm guessing what you might
call them but try Prospect/Client (one table), Contact, Address, Project,
Quote/Order (one table). There will likely be more tables before you're
done. In relational database design, you strive to properly identify the
entity type in play and then create a table for each entity. Then you can
create relationships between your representations of those entities that
mimic the relationships of the real-world entities.

Access has a steep learning curve but, once well begun, you can do some
really useful work. For starters, read a beginner book or two on Access.
Lurk these newsgroups; microsoft.public.access.tablesdesign and
microsoft.public.access.gettingstarted are a couple of good ones to start.
Every copy of Access comes with Northwinds.mdb, a good example for beginning
to learn. Open it up, try it out, look under the hood.

HTH
--
-Larry-
--

"Gerry" <(E-Mail Removed)> wrote in message
news:09704CA6-64C6-4D20-9C91-(E-Mail Removed)...
> Hi
>
> I have a simple database that provides quotations for work to be

undertaken.
> There is only one table containing all the fields. On the nain form I

have
> four fields: Price, Price2,Price3 and Price4 to allow for up to four
> different pieces of work on one quote. I want to be able to total the

costs
> of each of the four elements and display as a total figure on the form.
>
> I have used Total=Sum([Price]+[Price2]+[Price3]+[Price4]). This works,
> however, it totals the cost of ALL the figures in all the records and I

just
> want the total for each individual record to display on the form of that
> record.
>
> many thanks for any suggestions.



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating two different totals from a sub form Dave K. Microsoft Access Forms 0 16th Sep 2009 03:24 PM
Calculating Totals in Form =?Utf-8?B?U2NvdHQgRHVmb3Vy?= Microsoft Access 1 26th Sep 2007 09:04 PM
Re: Access - calculating totals from 2 subforms on a form! Jim Gordon Microsoft Access Forms 2 14th May 2006 07:48 PM
Calculating totals from a sub form to a main form Allie Microsoft Access Forms 1 6th Apr 2004 08:19 PM
Calculating totals with a form Bill Mills Microsoft Access Form Coding 1 3rd Jan 2004 06:08 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:56 AM.