How to Refresh a Formset by Using Commands Outside of the FormLast reviewed: September 21, 1995Article ID: Q136978 |
The information in this article applies to:
SUMMARYWhen moving the record pointer in a table whose fields belong to an active form, the form will not refresh if the command that moved the record pointer was issued from a menu or the Command window. For example, if there is a menu item issues a SKIP command, the record pointer will move but the form will not refresh. To have your application menu item move the record pointer and refresh the form, use the SKIP command to move the record pointer. and then use the _SCREEN.FORMCOUNT and _SCREEN.FORMS().REFRESH commands to refresh a form or formset correctly.
MORE INFORMATIONIf the active form on the screen is a form and not a formset, you can use the _SCREEN.ACTIVEFORM.REFRESH command alone from the menu or Command window to refresh the form. However, if the form could be a form or a formset, it is best to make your refresh code generic, so it fits both cases. The _SCREEN.FORMCOUNT command returns the number of forms on the screen, so it allows you to refresh each form whether a single form or a formset. Then you can use the FORMS() array to refresh each form if a formset is active. The FORMS() array is created when the forms start up. It is internal to Visual FoxPro. By putting these commands in a FOR loop, you can refresh a form or formset from a menu action. For additional information about a form that uses toolbars, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q136277 TITLE : FormCount Property Does Not Count Toolbars in a Formset Step-by-Step Example
|
Additional reference words: 3.00 VFoxWin
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |