A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Getting a calculation in a form to update a table



 
 
Thread Tools Display Modes
  #1  
Old November 6th, 2008, 12:43 PM posted to microsoft.public.access.tablesdbdesign
Wes
external usenet poster
 
Posts: 82
Default Getting a calculation in a form to update a table

Hi I have recently set up a new database but what I need it to do is a simple
calculation in a form, that will automatically update a table but when i set
it up, the form carried out the calculation fine, but it did not enter the
outcome of the calculation in the table. I am clearly doing somehting wrong
i just can't figure out what it is. The table is call Table 1 and the
formula for the calculation is
=[Pad size Rim] - [Pad size Axle], it displays the answer in Field [pad
difference] on the form, but not in the field in the table.

Please Help

Wez
  #2  
Old November 6th, 2008, 01:15 PM posted to microsoft.public.access.tablesdbdesign
Allen Browne
external usenet poster
 
Posts: 11,706
Default Getting a calculation in a form to update a table

Calculating the answer when you need it is the best possible solution.

If you need to see it elsewhere than in your form, create a query, and type
the expression into the Field row. Then use this query whereever you would
have used your table.

The reason this is better is that it cannot go wrong. If you store the value
in the table, and then it doesn't match, you're shot.

More information:
Calculated fields
at:
http://allenbrowne.com/casu-14.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Wes" wrote in message
...
Hi I have recently set up a new database but what I need it to do is a
simple
calculation in a form, that will automatically update a table but when i
set
it up, the form carried out the calculation fine, but it did not enter the
outcome of the calculation in the table. I am clearly doing somehting
wrong
i just can't figure out what it is. The table is call Table 1 and the
formula for the calculation is
=[Pad size Rim] - [Pad size Axle], it displays the answer in Field [pad
difference] on the form, but not in the field in the table.

Please Help

Wez


  #3  
Old November 6th, 2008, 01:34 PM posted to microsoft.public.access.tablesdbdesign
Tom van Stiphout[_2_]
external usenet poster
 
Posts: 1,653
Default Getting a calculation in a form to update a table

On Thu, 6 Nov 2008 04:43:01 -0800, Wes
wrote:

That's good, because in the vast majority of cases calculated fields
don't belong in a table. Why? Because they can become out of sync, and
it is very easy to recalculate in a query:
select [Pad size Rim] - [Pad size Axle] as "pad difference"
from Table1

So please delete that field from your table definition and use a query
to calculate.

-Tom.
Microsoft Access MVP


Hi I have recently set up a new database but what I need it to do is a simple
calculation in a form, that will automatically update a table but when i set
it up, the form carried out the calculation fine, but it did not enter the
outcome of the calculation in the table. I am clearly doing somehting wrong
i just can't figure out what it is. The table is call Table 1 and the
formula for the calculation is
=[Pad size Rim] - [Pad size Axle], it displays the answer in Field [pad
difference] on the form, but not in the field in the table.

Please Help

Wez

  #4  
Old November 6th, 2008, 02:37 PM posted to microsoft.public.access.tablesdbdesign
Stockwell43
external usenet poster
 
Posts: 579
Default Getting a calculation in a form to update a table

Hi Wes,

The guys are correct, the total should not be stored in the table. However,
to add to thier response, if you plan to create a report with these fields
you can also do the calculation there as well. So if no report you have the
query and if you have a report do it in the report.

Good Luck!

"Wes" wrote:

Hi I have recently set up a new database but what I need it to do is a simple
calculation in a form, that will automatically update a table but when i set
it up, the form carried out the calculation fine, but it did not enter the
outcome of the calculation in the table. I am clearly doing somehting wrong
i just can't figure out what it is. The table is call Table 1 and the
formula for the calculation is
=[Pad size Rim] - [Pad size Axle], it displays the answer in Field [pad
difference] on the form, but not in the field in the table.

Please Help

Wez

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.