Updating forms

While preparing for NCAB certification I came to the following (minor) problem: My small application stores information about several final products (Table 1), each one consisting of several raw materials (Table 2). The relationship (use of materials) is represented by a binding table (Table 3). In Table 1 there are several calcfields: number of raw materials (i. e. number of “product lines”) used in this particular final product, and their total price. There is also a form “Product card” based on Table 1, with a subform based on Table 3 (a “classic” example). In the “header part” of this superform (do you use this term in NF as opposite to subform?) there are also two textfields representing the mentioned calcfields from Table 1. I realised that when the user add a new line in the mentioned subform, delete some line, or just change amount of some material used, these calcfields in header are NOT recalculated automatically. He/she has to change focus from the subform to the superform (by clicking anywhere in the superform) first. I supposed it would be possible to declare a global variable of form type representing that superform, and then call .UPDATE while still in the subform, but it does not seem to work (really does UPDATE work with CurrForm only?). So my question is, whether it is possible to update (not current) form “by force” in some neat way. Thank you in advance. karel2 Edited by - karel2 on 2/5/01 10:50:35 AM

Sorry. You can’t update the main form from a sub form. The subform isn’t aware of the fact that it is a subform. You can search this forum an You’ll find some alternative solutions, but not any good ones I think. There simply isn’t one. //Lars

Sorry now I see there is a thread discussing this problem just a few lines below. I feel ashamed. Thank you, Lars. However I think this particular problem has nothing to do with subfoms and main forms. I was used to an environment in which you could update ANY (opened) form from ANY OTHER (opened) form: by calling one function you retrieved its object number, by calling another function you refreshed it. But of course it was NOT Navision :). karel2 Edited by - karel2 on 2/5/01 12:12:03 PM