use of ACTIVATE

I would like the cursor to focus on a partcular field in a form under specific condtions. Is ACTIVATE the correct function to use? If so, please give an example of how to use it in code. Thankyou. Pari.

CurrForm.YourControlName.ACTIVATE;

I had a similar problem, and i created a little function with just a Flag to show the form which control to activate (in the function it is easier to maintain than to put the ACTIVATE-command in every OnValidate-Trigger of the RequestForm). In the trigger i added the code IF value<>comparevalue THEN BEGIN do something; Activation(X); // where X contains the Flag for the function END; Activation(Flag) CASE Flag OF 1: RequestOptionsForm.Control1.ACTIVATE; 2: RequestOptionsForm.Control2.ACTIVATE; … END; Stefan Weinreich Billing Analyst

Thanks. I think using a function is good if you need to check more than one field. Pari.