>Hi,
>I have command button on a form, the click event will call a user define function to run something. But in the function will access a properties on the form.
>
>For example
>
>
>function check_count()
>ncnt = thisform.count
>....
>Return .t.
>
>
>I got an error said that thisform only use in METHOD.
>
>How can I solve it ?
>Please advise
>Derek
Pass the form reference to the function
if( check_count(m.thisform) )
..
endif
function check_count(FormObj)
ncnt = m.FormObj.count
endfunc
Gregory