By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,397 Members | 1,425 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,397 IT Pros & Developers. It's quick & easy.

Updating Fields On A Form

P: n/a
I have a form, which I'll call Form1. It's bound to a table (Table1).
Form1 has three fields Field1, Field2 and Field3 which correspond to
fields in Table1. Field3 is the sum of Field1 + Field2. I have an
AfterUpdate event which runs a macro if Field1 or Field2 are updated.
The macro (which calls a query) does run BUT Field3 does not reflect an
updated value on Form1 (or in Table1) unless I go through some
gyrations such as going to the next record and then back to the
original record. I'm probably missing something basic but am at a loss
as to what that is. Any help/suggestions would be appreciated.
Thanks, Sheldon Potolsky

Nov 28 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Sheldon wrote:
I have a form, which I'll call Form1. It's bound to a table (Table1).
Form1 has three fields Field1, Field2 and Field3 which correspond to
fields in Table1. Field3 is the sum of Field1 + Field2. I have an
AfterUpdate event which runs a macro if Field1 or Field2 are updated.
The macro (which calls a query) does run BUT Field3 does not reflect an
updated value on Form1 (or in Table1) unless I go through some
gyrations such as going to the next record and then back to the
original record. I'm probably missing something basic but am at a loss
as to what that is. Any help/suggestions would be appreciated.
Thanks, Sheldon Potolsky
Yes, you are missing something basic, Sheldon. It is very likely that
there is no point in storing the value of Field3 anywhere; it can be
calculated and displayed the moment you open your form. Generally, it
is not recommended to store values that can be calculated from others.

Alexandre Bejerman
Montreal, Canada

Nov 28 '06 #2

P: n/a
Try Me.recalc, since it is a calculated field.

--
Darryl Kerkeslager
Nov 28 '06 #3

P: n/a

ab****@hotmail.com wrote:
Yes, you are missing something basic, Sheldon. It is very likely that
there is no point in storing the value of Field3 anywhere; it can be
calculated and displayed the moment you open your form. Generally, it
is not recommended to store values that can be calculated from others.

Alexandre Bejerman
Montreal, Canada
Thanks for the quick suggestion Alexandre. However, I do need Field3
updated/displayed on Form1 as well as updated in Table1.
Sheldon

Nov 30 '06 #4

P: n/a
I used Me.Recalc in an After Update event to update Field3 and
an(other) After Update event for the entire form which ran my update
query as soon as my calculated field was updated and updated table
values. Thanks to those of you that helped.
Sheldon Potolsky

Sheldon wrote:
ab****@hotmail.com wrote:
Yes, you are missing something basic, Sheldon. It is very likely that
there is no point in storing the value of Field3 anywhere; it can be
calculated and displayed the moment you open your form. Generally, it
is not recommended to store values that can be calculated from others.

Alexandre Bejerman
Montreal, Canada

Thanks for the quick suggestion Alexandre. However, I do need Field3
updated/displayed on Form1 as well as updated in Table1.
Sheldon
Nov 30 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.