Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RowValid() and SetFocusField()
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
CodeMine
Titre:
RowValid() and SetFocusField()
Divers
Thread ID:
00713941
Message ID:
00713941
Vues:
51
I am using the RowValid() to check for required Empty fields like the CodeMine online help does in the tutorial.

It works fine, except if the field I am checking is in a Child Form (child form is based on FrmDataChildCustom and shares the cmrule with the parent form). The following code in the RowValid():
IF NOT EMPTY(m.cErrorField)
    * Display a message describing the error.
    THIS.DisplayMessage('A \c is required for this Form.', THIS.NiceFieldName(m.cWorkarea, m.cErrorField))

    * If we are in a form, this will put focus on the field with the error
    THIS.SetFocusField(m.cWorkarea, m.cErrorField)
    RETURN .F.
  ENDIF
  RETURN .T.
evidently ignores the line THIS.SetFocusField(m.cWorkarea, m.cErrorField) if it is dealing with a field on the Child Form. In otherwords, what is suppose to happen is the cursor is suppose to return to the field that was left empty. However, that does happen on the Parent Form, but not a Child Form.

Any help is appreciated.

Mel Cummings
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform