I have a form with a grid and a ADD, Save, Delete buttons. The ADD changes to Cancel. Why do I have to click twice on the Cancel button to cancel an ADD? here is the code in my valid event. In debug, the grid text shows focus and not the clicked button. Here is the valid event code:
* get reference to object under mouse pointer
oLoc = sys(1270)
ifvartype(oLoc)="L"
oLoc = Thisendif* is the location the Close or the Add/Cancel buttonIFinlist(lower(oLoc.name),"cmdclose","cmdAdd")
RETURN .T.
ELSE
SomeCode
ENDIF
Thanks, Chuck
Extreme Programming = Plan -> Design -> Code -> Test