I have a grid with several columns that use the standard textbox of the grid. One of these columns I do not want to be empty. The following valid works as long as I stay within the grid by tabbing or clicking with the mouse. But if I click outside the grid (Such as button), I still get the warning message, but the focus is now outside of the grid with the field still empty. The user can then click the save button (Bad). I tried removing the warning form thinking it was causing the problem, but it didn't help. Is there something wrong with this validation, or do I need to take a diferent approach?
Code:
* In Valid of Grid TextBox
With This
* Empty value not allowed
If Empty(.Value)
... Custom Warning Message (Form) Displayed Here
.Value = cOriginalValue
Return .F.
Endif
... Rest of Code Here
Endwith