Display values in form

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

Guest

I have created a form that allows me to input a number in one box and another box will take that number and multiply is by 1.35. However, when i query the form, the box which performs the function, does NOT record the value it finds. How can i get it to record the number it calculates?
 
1. If it is a "Calculated Value", i.e. value that can be
derive from other value(s), you should NOT store it in
your Table. Storing Calculated Values violated one of the
main principles of Relational Database Design and can
create inconsistency problems later.

When you need the Calculated Value, you should simply re-
calculate it which is actually faster than retrieving it
from hard-disk.

2. It is still possbile to store the Calculated Value.
However, because of 1, Access does not have "easy-to-use"
feature to store Calculated Value.

Recommend that you don't store the Calculated Value until
later when you can make informed choice on whether to
store or not.

HTH
Van T. Dinh
MVP (Access)



-----Original Message-----
I have created a form that allows me to input a number in
one box and another box will take that number and multiply
is by 1.35. However, when i query the form, the box which
performs the function, does NOT record the value it
finds. How can i get it to record the number it
calculates?
 
query the form? i'm not sure what you mean by that.
the box which performs the function, does NOT record the value it
finds. How can i get it to record the number it calculates?

do you mean you want the calculated value saved in a field in the underlying
table? if so, the rule of thumb is to *not* save calculated values in a
table; instead, just calculate them whenever you need to display them in a
form or repot. rules always have exceptions, but you should have a good
business and/or technical reason for breaking one.

having said that, if you want to save the calculated value in a field in the
underlying table, suggest you change your approach a little. in the form,
set the calculated control's ControlSource to the name of the field; now
it's a bound control, no longer using a calculation.
create a macro using the SetValue action, to set the value of the control to
the calculated amount. (or you can use an event procedure and VBA, instead.)

if you need more specific instruction, or if i've misunderstood your intent,
post back to this thread.

hth


Adam said:
I have created a form that allows me to input a number in one box and
another box will take that number and multiply is by 1.35. However, when i
query the form, the box which performs the function, does NOT record the
value it finds. How can i get it to record the number it calculates?
 
Back
Top