473,416 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

Saving calculated values, Please

I know that this is not the way, however I need to save certian
calculated values so that they do not change over time, ie. new tax
rates etc. This is for an invoice header and invoice subform. I have a
form myheader and mysub that are linked via a invoice number. mysub
calculates qty * list = extprice. I am summing these into a sum_ext
field in mysub footer. I need to have this value updated into the
myheader invsubtot. I have tried many variations to get this but the
closest I have come is to have it updated AFTER the second transaction
to the FIRST transactions value. Is there a way to use on change
control of the mysub in the footer to trigger an updating of invsubtot
in myheader or something? I have been banging on this till I am going
in circles. Thanks ahead of time for the help.
Nov 12 '05 #1
1 2166
There are a couple of ways to "save" the calculated values.

1) Make a table for the data that can change and keep track of it there. For
example, if the sales tax rate changes, in the table you would place the
date of the change and the new rate. You could then use the date of the
invoice to go back and look-up what the tax rate was on the date of the
invoice.

2) In the form with the calculated textbox you would use the BeforeUpdate
event of the form to change the value in a textbox that is bound to a field
in the table. You would set the value of this textbox to the value of the
calculated textbox. The field in the table would be your "saved" calculated
value. This could be modified to only save for new records, not changed ones
if you wish. To do that just check to see if you're at a new record (If
Me.NewRecord Then)

--
Wayne Morgan
Microsoft Access MVP
"douh" <do**@tskgrinding.com> wrote in message
news:8c*************************@posting.google.co m...
I know that this is not the way, however I need to save certian
calculated values so that they do not change over time, ie. new tax
rates etc. This is for an invoice header and invoice subform. I have a
form myheader and mysub that are linked via a invoice number. mysub
calculates qty * list = extprice. I am summing these into a sum_ext
field in mysub footer. I need to have this value updated into the
myheader invsubtot. I have tried many variations to get this but the
closest I have come is to have it updated AFTER the second transaction
to the FIRST transactions value. Is there a way to use on change
control of the mysub in the footer to trigger an updating of invsubtot
in myheader or something? I have been banging on this till I am going
in circles. Thanks ahead of time for the help.

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: SJH | last post by:
I have been given an older database and asked to make upgrades and what not. One interesting thing I have come across with the database is that it was at one time set up so one of the tables would...
0
by: Henry | last post by:
Hi Is there any good ideas how to update form vb code always after some values are changed / added by vb (not user). I have some code behind subforms vb and there are calculations behind...
3
by: Jeremy Weiss | last post by:
I've got a temp table that contains the fields: amountowed, amountpaid, and balanced. I've got a form that shows this information and I've set it up so that when the amountpaid field is changed it...
2
by: Douglas Buchanan | last post by:
I set the OnExit property of the "Cost" field in subform "subJobDetail" to save the record (see below). Then I call a global sub to copy the )] calculated field to a field in the subform "subJob"....
5
by: John Bahran | last post by:
I am trying to use calculated fields in my query but all the results are zero ven when they're not. Please help. Thanks.
18
by: TORQUE | last post by:
Hi, Im wondering if anyone can help me with a problem. I have a form with more than 50 unbound fields. Some of the fields will be blank from time to time. This seems to be where im having...
1
by: mazdotnet | last post by:
Hi guys, I have to make a event signup page for our company that would display the event time/date in 3 different time zones (Eastern - New York, Central - Chicago, and Pacific - San Francisco)....
8
by: Gilberto | last post by:
Hello, I have created a query to help me calculate some total values i need for a report. In the query field i have the following: TCL1: Costing!*(Engineering!+Engineering!) The results...
5
by: royals | last post by:
Hello Access gurus, I am a self-taught Access “developer” and have a ton to learn so please allow me to sound stupid. I am using 2003 on a XP platform. I manage properties for an...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.