Posts Tagged 'Hours'

Measure the time it spends an operator to insert a record

Thursday, June 19th, 2008 |

This was certainly a player Elton Rueb and he even managed to solve before I help. What the reader was intended to measure the time it takes a user to insert a record and it has three fields: one for the start time when it opens the form, for the first time to end that is inserted when you click the record button and a field to calculate the difference. This is a simple example but may be lacking to those who want to calculate difference between two times. So the Elton Rueb (Rio de Janeiro - RJ - Brazil) provided the example that could help someone else.

Download: Test Time

Point

Tuesday, March 18th, 2008 |

At the request of the player Joao Cabrita developed this form of control point that applies to a fire station, more specifically to the needs of the reader.

It is a basic example, but with some more advanced details on what it is intended to make the control of entrances and exits of employees, verify that worked a 12 hour shift and add more hours worked and hours worked to less.

All this for a monthly report of attendance of each employee.

Download: Point

Calculations with hours

Tuesday, February 19th, 2008 |

This example shows how to perform calculations on hours. It is useful for those who need to know how much time elapsed between a start time and end time. It is not enough to make the subtraction of the end time for the start time, because if the end time moving from one day to the next accounts will no longer correct, for example:

Start Time: 23:00:00

End Time: 02:00:00

End Time - Start Time = 02:00:00 to 23:00:00 = -21:00:00

Obviously it is not so simple to work with time, because then instead of having three hours to correct result would wrongly -21 hours.

To get around this period that goes from day to day we have to check first if the end time is greater than the start time, whichever is greater then the calculation is: End Time - Start Time.

If you are under then we have to do the calculation another way, namely:

Start Time: 23:00:00

End Time: 02:00:00

Total Time: 23:59:59

Hit: 00:00:01

Basically what we do is add to the value of 24:00:00 subtraction to give us the correct three hours. That is:

End Time - Start Time + Total Hours + Hit = 02:00:00 to 23:00:00 + 23:59:59 + 00:00:01 = 24:00:00 = 03 + -21:00:00 : 00:00

Download: Calculus with Time

Display a message of greeting

Monday, January 14th, 2008 |

Through a small code we can welcome the user depending on the time you open the form. In this example we can see three different messages:
1-Morning Until 12:00;
2-Up at 19:00 Good afternoon;
3-Between 19:00 and 00:00 Good evening.

Just need a small code, which is as follows:

Public Function Greeting ()
Dim strMsg As String

If Time <# 12:00:00 PM # Then
strMsg = "Hello! Have a nice day! "
ElseIf Time <= # 7:00:00 PM # Then
strMsg = "Hello! Good afternoon! "
Else
strMsg = "Hello! Have a good night! "

End If
Compliance = strMsg
End Function

Then to call the code, we use a text box and as the origin of the compliance monitoring write = ().

Download: Compliance

Presentation

Avatar

Thank you for visiting.
Subscribe to feed not to miss any messages.

Here in blog I will provide examples of working with Microsoft Access and also ask questions to those who ask. More

Want to subscribe?

Subscribe or subscribe by email:
Enter your email:


Ads