Alessio,
You can not use this. or thisform. inside a .prg they only have meaning inside of a method of an object. If your UDF() need reference something from the form, send the form object as a parameter to the udf:
x = GetDate( thisform )
function GetDate( oForm )
? oForm.Caption
return date()
>I call a UDF called getdate from a form and when it processes a seek() with parameters it gives me the error "Thisform ......"
>If I ignore the error the other times I call the UDF it's all OK.
>I call this UDF even from other forms with the same statements and it never gives me any problem.