I don't understand what you mean by "field format to short". Set the Format
property of out_duration_txt to Standard and Decimal Places to 2. You
should get 24.00 displayed as the result of your calculation. Is
out_duration_txt bound to a field? If not, you could also explicitly set
the data type by saying:
Me.out_duration_txt = CDbl((enddate - startdate) * 24)
--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
Derek said:
Went back and changed the code to the following and it works, but it is
not formated for time it shows up as a large number. Using 04/03/04, 23:00
and 04/04/04, 23:00 as the dates. How would I get this to read in hours, I
tried setting the field format to short but then I get 0:00. The format
that I have used on the date fields is: mm/dd/yy", "hh:nn