Sandi,
use the WHEN method in the button. Create a new form property. Have your valid set it to true or false and have the WHEN return that value. If you need to do this on a line by line basis then put a logical field in your cursor or table and use it in place of the form property.
John.
>Does anyone know how to programmatically disable a cell in a grid? I have a grid which has one column that contains a button (to open a form containing a set of details about that record). I want to put code into another column's valid event to enable/disable this button depending on the value of the controlsource.
>
>Thanks for the help
>
>Sandi Cassidy
>
scassidy@canaccount.com
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn