>hi,
>thank you for reply.
>i need a function to do that,
>
>i have more than 54 textboxs at my form ,to compute how many hours the employees work evry day,for revery 2 weeks,ex.. from hours:miniut to hours:miniut.
>
>and where i can use the function at myform ,
>
>if you have a time,i need full example,
>
>thanks.
Simply create a method in the form and pass it the values you wish to calculate. Then simply put the result in the RETURN call. The Valid or LostFocus events are where the function should be called with something like
lctime = ThisForm.SubtractTime(ThisForm.Txt1.Value, ThisForm.Txt2.Value)
ThisForm.Txt3.Value = lctime
George
Ubi caritas et amor, deus ibi est