G
Guest
I tried that but the problem I have is ...
The results show up on the screen for textbox 1, textbox 2, and textbox 3
(That's fine)
but
when I close the screen and later I want to reopen the screen to see if
those values are still stored.
Textbox 1 shows up because it is a stored value.
Textboxes 2 and 3 reset back to empty fields and I don't know why. I need
advise on how to keep these values visible at any given time.
Expand AllCollapse All
The results show up on the screen for textbox 1, textbox 2, and textbox 3
(That's fine)
but
when I close the screen and later I want to reopen the screen to see if
those values are still stored.
Textbox 1 shows up because it is a stored value.
Textboxes 2 and 3 reset back to empty fields and I don't know why. I need
advise on how to keep these values visible at any given time.
Klatuu said:What you want to do is easy, but you should not do it. Two of the controls
are calculated values and should not be stored in a table. One of the basic
rules of database design it "do not store calculated values in a table". You
do the calculations when the results needs to be presented to a user or used
in another calculations. Storing calculated values wastes time, disc space,
and has a high chance of becoming inaccurate.
First, how it should be done:
Store only the value in Textbox1 in the table.
Make the Control Source properties for 2 and 3:
Textbox2
=Textbox2 * .5
Textbox3
=Textbox1 + Textbox2
If you insist on doing it incorrectly, use the After Update event of TextBox1:
Me.Textbox2 = Me.Textbox1 * .5
Me.Texxtbox3 = Me.Textbox1 + Me.Textbox2
Expand AllCollapse All