In the valid event of the text box -- test for a backspace by using the LastKey()command
If LastKey() = 127
Return .f. && produce an invalid input notification
Endif
or--
If LastKey() = 127
Return 0 && return zero will keep the cursor in the box
Endif
Note however that with the second option if the backspace is the last keypress before someone tries to exit the form it will also appear as if the close box is not working. The same might be true if one tries to click into another object. I didn't test for that.
You might also be able to do something with the keypress event or the interactive change event. Get creative.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.