>In Foxpro 2.6 for Windows. I am trying to have a screen level validation that checks some things before the screen closes. I entered a logical statement into the screen valid section of the screen generator. I also have some buttons ( for example a save/exit button).. The save exit button contains:
>
>GATHER MEMVAR
>CLEAR READ
>
>When the save exit button is pressed the screen level validation clause IS NOT executed
>
>When I press ESC to exit the screen the screen level validation IS EXECUTED
>
>What should I do in my exit button in order to (1) trigger the screen level validation and (2) exit the screen?
>
>Thanks in advance!
If a read follows @...get statements then clear read doesn't trigger read valid clause. To trigger a read valid then use foundation read. Detailed information is in the help. See read - foundation read and clear read. If it's a single screen and don't want to use foundation read, then execute your valid code in button's valid, and issue clear read if it's ok to exit. Another simple trick is to use [keyboard "{ESC}"] instead of clear read. This triggers read valid clause as you also said.
Cetin