recalcuate text boxes (PART 2) NEED HELP PLEASE!!

  • Thread starter PLEASE HELP ME. NOW !!!
  • Start date
P

PLEASE HELP ME. NOW !!!

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.

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
 
J

Jeff L

Is there an event on your form that gives Textbox2 and Textbox3 their
data, like On Update of Textbox1? Obviously, when you open the form,
you have not updated Textbox1 and so the values of the other 2 will not
be populated. I would suggest that you follow what Klatuu told you and
in Textbox2 put =[Textbox1] * .5 and in Textbox3 put =[Textbox1] +
[Textbox2]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top