>i created a function in my main program called function result()
>how, where and it what way i call the function in my grid to show the results of the function.
>the function is suposed to calculate time lapsed between two times..
>can any body please help me
Just a tip over what Erik said: a slightly better way is to create a custom method in the form which holds the grid, and then have thisform.result() as controlsource of the column where it should appear. This way the function is kept there where its used, and you don't have to worry if tomorrow you can't remember where's the function. If this function is used at various places around the app, then you may be better off having a separate file called result.prg (and don't put "Function Result" or "Procedure Result" in the first line - it's slower) and then just do as Erik said.