Strange error

mtagliaferri

Registered User.
Local time
Today, 22:41
Joined
Jul 16, 2006
Messages
550
Hi all, I got the help for solving my problem with the help of all of you on this forum, my problem was calculating the ammount of hours and minutes from two date and time records, so all the indications where given to me troughout the db1 attached, when I applied oll the criteria and formulas to my database all the calculated results appear with a negative numeber as on the picture attached.
Can anyone give me an explanation of why, or even better a solution :o
Thanks
 

Attachments

  • db1.zip
    db1.zip
    16.1 KB · Views: 126
  • Pic1.jpg
    Pic1.jpg
    42.1 KB · Views: 131
Your image of a form and the database you've attached don't match up! The only form in the db (which is not the one in your attached jpeg) appears to be doing it's calculations correctly. Not having the errant form to examine, one can only guess at what's wrong with it, but when you're calculating time differences and you get negative results, it usually means that you've reversed your starting/ending fields in your formula/function.
 
knowing what TAFB is would help, but it appears that what you are doing is normal since you are taking the difference between 2 times

13:35 check in
14:16 check out

16-35 = -19

What you need to do is take into account when your minutes are less in the Check-out phase, eventhough the time is going to be greater overall then check-in time.
 
The db1 file, is the one that was created as an example and build up from you all here on the forum. I have then created on my own database the field to calculate the time difference TAFB which i have copied all the formulas on my form, I am not able to post a copy of my db as it is huge, the picture is a screen print of what i get on my database, the only thing that makes me wonder is that on my database the "duty End" field is calculated by adding the "Duty Date" and the "N of Days" -1 ....
Hope I have been more clear with my explanation!!
:)
 
Well, if the reason you're seeing what you are is not because of the end date - minutes being greater than the beginning date - minutes, then there is something else going on behind the scenes.
 
I'm sorry, but posting a database other than the one you're having difficulties with is plain silly and a waste of time to everyone here! An even bigger waste of time is posting a screen shot of your form and thinking anyone can tell you what's wrong with your code from looking at it!
 

Users who are viewing this thread

Back
Top Bottom