Calculation in a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table that I have based a form on. This form is used to update and
add information to the table. There are three number fields in the form
(from the table). Field 1 and Field 2 are for entering numbers, Field 3 is
to add the first two fields and return the sum in Field 3. All three numbers
are then to be added to the table. I am having a hard time having Field 3
(the calculated field) adding to the table. Any advise?
The process I did to calculate the fields was I used the 'build..." button
in Field 3's
Control Source Property to add the two fields from the form.
 
Hi Julie

1st - don't store the calculated data. There is hardy ever any good resons
to. You can always see the result on the screen, use it in other furula,
print it in a report, etc,etc.

2nd - If for some very strange reason you do want to store the data you can
use the setvalue AfterUpdate action [Field1]=[Field1]+[[Field2] - but like I
said it's MUCH better not to.

Hope this helps
 
You should not save Field3. There is no reason to do so. It, in fact,
violates a basic database normalization rule. Calculated values should not
be stored. You can display it on your form just as you are. You can also do
the calculation in a query, or a report, or anywhere else you need it.

Don't confuse using data with storing data.
 
So - not only do you freely admit that americans say Datblasted but now we
have sunk towards YYYEEEEEAAAAHHH!!!!!.

<:-)
 
Actually, I was translating for an non Texan audience. The original would be
YEEE HAW!

It just makes me happy when people listen to reason. I was more expecting
Yea, but, I have to store it because <insert nonsense here>
 
I’m sure that all non Texans will appreciate your kindness. Not really sure
what will happen when (if) we see a YipeeeAyeYay appear. We shall have to
wait and see.

As you will understand everyone from the UK has the same accent and
intonation as the Queen and so we are always pleased to hear when former
colonies seem to be progressing along the road towards eloquent colloquiums
even if non Texan paraphrasings are required.

I have heard (albeit from a non-reliable source) that some former colonies
are actually moving towards full independence, of course I didn’t believe it.
Whatever next.
 
The YipeeeAyeYay would be California (They talk funny out there)

Actually, Texas was never a colony. It was originally part of Mexico. It
gained it's Independance in 1836 and became The Republic of Texas. For most
of us true Texans, any history writen after 1846 is considered either fiction
or hearsay.
 
OK, point taken - I will raise a glass to the great state of Texas at the
weekend but only after 14 minutes to 7 of course.
 
Back
Top