Wai Wai,
Just drop the button on a form and doublclick it. A new window will open where you can write code for each of the buttons events. At the top of the window will be a combobox labeled 'Procedures' change that to the 'click' event, then write your code.
hth
>how to add a function or some coding into a object.event?!
>say, i want to run the command messagebox("test",0,"test")
>when the command1.click happen~!
>how to add into it by using coding~?
Roi
'MCP' Visual FoxPro
In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!