Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to calculate fields in a subform. after update

Status
Not open for further replies.

Scoty

Programmer
Oct 25, 2000
278
US
I have a form that has a subform. I use the fields in the subform to calculate fields on the parent form. This works great the first time. The problem arises when I goto the next record. My parent tries to calculate the fields before the subform updates. I have tried a for/next timer (upto 1,000,000) and it has not worked. Also note that this db will end up on a network drive. Sometimes fine, sometimes slow. So what I need to know is.. how would I code the parent to wait for the subform to update before calculating the fields?
Thanks in advance
Scoty ::)
 
Would it help to, upon changing parent records, set the focus to the sub form, and then set it to the parent?

Terry M. Hoey
th3856@txmail.sbc.com

Ever notice that by the time that you realize that you ran a truncate script on the wrong instance, it is too late to stop it?
 
Well I tried what you said. It does not change. I have also tried
Code:
current:
If [form_subform].Text10 = 0 Then Goto current else ParText.10 = [form_subform].Text10
but this just throws me into a eternal loop because
Code:
[form_subform].Text10
never updates.

how would have thought something so simple would be such a problem?
Thanks
Scott ::)
 
Well,
I got it work with a timer do...loop while w/a do events. but now when I go back to a previously view record I get an error that reads "The macor of function set to the BeforeUpdate or ValidationRule property for this field is preventing Microsoft Access from saving the data in the field." One major problem with this error. I have no BeforeUpdate's or ValidationRule properties set. Anyone? Anyone? Please help
Scoty ::)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top