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

Forms and Subforms - Many Calculations

P: n/a
I'm looking for advice on how to perform calculations on my forms.
Iwill try to explain the situation as clearly as possible.

I have a form that has multiple sub-forms. Some of these sub-forms
have sub-forms in themselves. On Each of these forms there are
calculation fields. Some of these calculations use data from the
parent form. Here are my questions:

1 - What is the best way/best event to have fields I want to save in
the underlying tables make equal to the calculation fields. For
example:
On a subform I have a calculation field (unbound) that calculates the
part weight. I have a bound field called part weight that I want to
have = the unbound field. I tried to code this on the On Current
event and it locks up the forms.

2 - What is the best way to have all of these calculation fields
update after fields on the parent form are updated. I'd like to stay
away from a Calculate command button. I want the fields to refresh on
their own. Does a simple refresgh command on the main form refresh
all of the subforms?

Thank you for your help!

Chris
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Look at it this way -
If the value of one of the fields which is used to calculate Part Weight
changes, do you want Part Weight to change for that record?
If the answer is yes, then it's unwise to store the Part Weight value at
all -
just store the component fields, and recalculate Part Weight
whenever you need it.
If the answer is no, then your situation is more complex, because you
will need to specify under what conditions it will be recalculated, and
under what conditions it will not.
It's best to have all of that figured out before you begin to code.

HTH
- Turtle

"chris vettese" <ch**********@yahoo.com> wrote in message
news:40**************************@posting.google.c om...
I'm looking for advice on how to perform calculations on my forms.
Iwill try to explain the situation as clearly as possible.

I have a form that has multiple sub-forms. Some of these sub-forms
have sub-forms in themselves. On Each of these forms there are
calculation fields. Some of these calculations use data from the
parent form. Here are my questions:

1 - What is the best way/best event to have fields I want to save in
the underlying tables make equal to the calculation fields. For
example:
On a subform I have a calculation field (unbound) that calculates the
part weight. I have a bound field called part weight that I want to
have = the unbound field. I tried to code this on the On Current
event and it locks up the forms.

2 - What is the best way to have all of these calculation fields
update after fields on the parent form are updated. I'd like to stay
away from a Calculate command button. I want the fields to refresh on
their own. Does a simple refresgh command on the main form refresh
all of the subforms?

Thank you for your help!

Chris

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.