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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

save calculate value



 
 
Thread Tools Display Modes
  #1  
Old February 21st, 2009, 10:01 AM posted to microsoft.public.access.forms
Zina
external usenet poster
 
Posts: 6
Default save calculate value

I have design a form that enter information of some goods , I enter Price per
unit of item and quantity of item ,then I calculate the total price of that
item ,I want to save the new calculated value in field I mean I want to save
vallue in the related field of its related table

Thanks in advance
  #2  
Old February 21st, 2009, 10:10 AM posted to microsoft.public.access.forms
Stefan Hoffmann
external usenet poster
 
Posts: 991
Default save calculate value

hi Zina,

Zina wrote:
I have design a form that enter information of some goods , I enter Price per
unit of item and quantity of item ,then I calculate the total price of that
item ,I want to save the new calculated value in field I mean I want to save
vallue in the related field of its related table

Why would you do that? In a database you normally never save/store
calculated values.

To (re-)use calculated values create a query based on that table:

SELECT *, Price*Quantity As TotalPrice
FROM yourTableName

This is the queries SQL.

Just use this query as record source for your forms and your done.



mfG
-- stefan --
  #3  
Old February 21st, 2009, 04:00 PM posted to microsoft.public.access.forms
GBA
external usenet poster
 
Posts: 174
Default save calculate value

presuming your underlying table has a 'Total' field; and that this field also
exists on your design form; then
in the 'AfterUpdate' event of the quantity field put:
me.Total=me.price*me.quantity

that will simply automate that math for your user

"Zina" wrote:

I have design a form that enter information of some goods , I enter Price per
unit of item and quantity of item ,then I calculate the total price of that
item ,I want to save the new calculated value in field I mean I want to save
vallue in the related field of its related table

Thanks in advance

 




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:46 PM.


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