>Hi!
>
>What's the best way of enabling a command button if certain fields on a form a filled in the way you want them?
>
>I'm sticking my condition in to the refresh of the button, then calling a refresh of the button in each of the lost focus events of the fields in question.
>
>IE this.enabled=gauge<>0 and length<>0 etc etc.
>
>Surely there must be a better way of doing this?
>
>Thanks in advance
That's about the way I handle similar situations. To simplify maintenance, I call a form method from the LostFocus of relevant objects. Thus, I can enable, recalculate, or whatever, in a single place.
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)