Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Empty Textboxes
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00702817
Message ID:
00702846
Views:
8
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
Previous
Reply
Map
View

Click here to load this message in the networking platform