Posting a Caclulated Value to a data table

G

Guest

I have a Form that has three Text Boxes that are Calculated fields. What I
want to do is to post whatever values are in these boxes into a data table in
which I have created fields to receive this data.

Thus far the only way I've been able to make this happen is by creating a
second Text Box with the Control Source set to the receiving field in the
data table and then creating an “On Click Event†for the Text Box, which
simply displays the value of the Calculated field in the second Text Box.
Of course, this requires the User to Click the Text Box in order for the data
to be posted back to the data table.

I would like to post this data back any time the User creates a new record
or closes out the Form without the User having to do anything.

I’ve run up against this one several times in different applications and
have never figured it out. Sure could use some help on this one.

Thanks,
Larry
 
R

Rick Brandt

Larry said:
I have a Form that has three Text Boxes that are Calculated fields.
What I want to do is to post whatever values are in these boxes into
a data table in which I have created fields to receive this data.

Thus far the only way I've been able to make this happen is by
creating a second Text Box with the Control Source set to the
receiving field in the data table and then creating an "On Click
Event" for the Text Box, which simply displays the value of the
Calculated field in the second Text Box.
Of course, this requires the User to Click the Text Box in order for
the data to be posted back to the data table.

I would like to post this data back any time the User creates a new
record or closes out the Form without the User having to do anything.

I've run up against this one several times in different applications
and have never figured it out. Sure could use some help on this one.

Thanks,
Larry

It's difficult because it's a bad idea. Calculated values should not be
stored except in very rare circumstances. Create a simple SELECT query on
your table and add the three calculations to the query. Then simply use the
query instead of the table in any case where you need those values.
 

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