>>I would like to display a messagebox as the user clicks any field or any place of my form
>>
>>Is it possible without have to write the code in each field ?
>>
>>= messagebox ("This form is readonly, click edit to unlock it")
>>
>>Moises
>
>
>for each oControl in thisform.Controls
> if upper(oControl.BaseClass) = 'TEXTBOX'
> =bindevent(eval('Thisform.'+oControl.Name) ,"Click",ThisForm,"myClick")
> endif
>endfor
>
Zahid,
In this code, why do you need evaluate part, why not
bindevent(oControl, 'Click', thisform, 'myClick') ?
If it's not broken, fix it until it is.
My Blog