Calculations not appearing (1 Viewer)

Robert C

Registered User.
Local time
Today, 02:00
Joined
Mar 27, 2000
Messages
88
I have an Access 2007 database which was working happily in Windows XP Pro SP2. I have just upgraded to Windows 7 and all of a sudden some calculations in my forms and subforms are not working. Below is a typical example:-

=Format(Int([TotalAccrued]/3600),"00") & ":" & Format(Int(([TotalAccrued]-(Int([TotalAccrued]/3600)*3600))/60),"00") & ":" & Format((([TotalAccrued] Mod 60)),"00")

Can anybody tell me what setting I need to adjust in order to get the results of these formulas back.

Thank you very much in advance.

Rob
 

JamesMcS

Keyboard-Chair Interface
Local time
Today, 02:00
Joined
Sep 7, 2009
Messages
1,819
What happens When you try and view the result of this form? And what is totalaccrued?
 

Robert C

Registered User.
Local time
Today, 02:00
Joined
Mar 27, 2000
Messages
88
Hi James

Thanks for the reply. It's a bit weird - the cell is simply blank unless I click in it at which point six zeros appear (00:00:00) because is is converting the total number of seconds accrued into hours, minutes and seconds. However, the calculation appears when I put the form into design view.

It's not just limited to time formatted controls either though. I have another which is adding up some money and this behaves in teh same way.

Very strange.

Cheers

Rob
 

JamesMcS

Keyboard-Chair Interface
Local time
Today, 02:00
Joined
Sep 7, 2009
Messages
1,819
Yeah, I've had that in Access 2007 as well - haven't found a solution to it but thinking about it a form.refresh might work...

Have you tried just formatting the number of seconds in the expression, as in
Code:
format([TotalAccrued],"hh:mm:ss")[code]
 

vbaInet

AWF VIP
Local time
Today, 02:00
Joined
Jan 22, 2010
Messages
26,374
... and perhaps you could tell us exactly what you mean by it's not working? Is it coming up as blank or is it displaying #Error?

Ignore the above. Late post!
 

Users who are viewing this thread

Top Bottom