Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Empty Textboxes
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00702817
Message ID:
00702846
Vues:
9
Here's some ideas :
lcEmptyFieldName = ""
SELECT (AliasName)
SCATTER NAME loRS MEMO
lnPropertyCount = AMEMBERS(laProperties,loRS)
FOR lnProperty = 1 TO lnPropertyCount
  luValue = EVAL('loRS.'+laProperties[lnProperty])
  IF EMPTY(luValue)
    lcEmptyFieldName = laProperties[lnProperty]
    EXIT
  ENDIF
ENDFOR
RETURN lcEmptyFieldName
Since you want to SetFocus to the bound control containing the empty field I'd say the below code might be better:
FOR EACH loControl IN THIS.Controls
  IF PEMSTATUS(loControl,"ControlSource",5) NOT EMPTY(loControl.ControlSource) AND EMPTY(loControl.Value)
      loControl.SetFocus()
  ENDIF
ENDFOR
>Is there a way I can have my app check to determine if any fields are left empty on a form. If it finds a field that is empty, the user shoudl be prompted and the textbox that the has that field as a control source should be setfocused. Any ideas?
Heavy Metal Pedal - click with care
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform