OK, so you've got a form with a "From" date and "To" date, and a field showing a number of hours.
So what is your question? Are you asking how to calculate the number of hours between the From and To dates?
If so, we have already given you the information you need:
To determine the number of
days between the two dates, subtract the From date from the To date (which, in this case, are Text4.Value and Text5.Value respectively).
To determine the number of
hours, multiply the number of days by the number of hours in a day. Then store that result in the relevant field (Text6.Value).
(This assumes that Text4 and Text5 are date fields.)
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips and downloads