Active Subform

I create new form and insert a subform later.When I run form first active control is become the field in subform. But if i delete(or not insert) subform first active control is become ‘upper left corner’ control. The Changes of ‘ActiveControlOnOpen’ property do not effect anything. Could you please advise me what to do?

Set the SaveControlInfo property of your mainform to false. Anolis Sittard Netherlands

Anolis, this not take effect. What i do more? I have two subform in mainform Edited by - Penta-Khripunov on 11/10/00 1:37:05 PM

Did you try to set the SaveControlinfo propeties of the two subforms to false? It’s not realy clear what you are trying to do. Do you want the upper left corner control to be the default, or not? If you want to do that: -Set the SaveControlInfo on the mainform and subforms to false. -Set the value of the ActiveControlOnOpen property of the mainform to the controlID that you want to be active. This should work. Anolis Sittard Netherlands

Anolis, I made all changes that you adviced. And I see your actions are right but stupid subform makes itself active nevertheless. I have 2 subforms and when I create a copy of second (not active) subform and then delete original second subform, i.e. the second subform becomes older, this second subform becomes active on open form. But if I make so with my request control, subform intercepts active mode anycase. I have v.2.0 of application and v.1.3 of objects.

The problem you describe is a very old and known Navision Bug. I dont’ know when it was corrected because in 2.60C it works. In older Versions (1.2, 1.3 and 2.0) I made exactly the same experience like you. Whether it works as intended (ActiveControl on open will be activated desired) depends on whether or not the subform has data. I think to remember that whenever the subform has entries, the focus is set on the subform. If the subform is empty, focus is set correctly to ActiveControlOnOpen. Probably it’s vice-versa. It’s a long time since I last worked with Fin 2.0 but the following should work: MainForm - OnOpenForm Subform must have a name (e.g. MySubform) Activate the Subform (even if that’s exactly NOT what you want!) Activate the Control you want. such as: Currform.MySubform.activate; Currform.Number.activate; My stressed memory thinks to remember that this did the trick. Marcus Marcus Fabian phone: +41 79 4397872