Need help with one of my Time Clock forms (2 Viewers)

if there is no clockOut, what do you like to do with it? or maybe create a Default of clockOut same as clockIn value?
 
you need to copy from the attached db:

Query: TCQuery
Form: TimeClockReport
Function: CalcTotalHrsMin() (Modified in ModuleDay)
 

Attachments

Use the NZ() function.
 
you need to copy from the attached db:

Query: TCQuery
Form: TimeClockReport
Function: CalcTotalHrsMin() (Modified in ModuleDay)
Hey arnelgp. Don't want to keep bothering because your help is great. The error does seem to be fixed unless I close the program and reopen several times the error reappears in report. I am testing doing occasional clock ins with no clock outs and testing report in between them. This is when the error happens. I know there may not be as many no clock outs as I am testing with but it only takes a few and I'm sure I'll see them.
 
Hey arnelgp. Don't want to keep bothering because your help is great. The error does seem to be fixed unless I close the program and reopen several times the error reappears in report. I am testing doing occasional clock ins with no clock outs and testing report in between them. This is when the error happens. I know there may not be as many no clock outs as I am testing with but it only takes a few and I'm sure I'll see them.
I fixed it. I never pat myself on the back because I usually don't get the opportunity, but this time I feel like it. Coding is not like riding a bike if you haven't done it in over 30 years. So to look at a bunch of code and try to figure out what you need to change when it is Greek, well you get the idea. I come from as far back as Cobol and Fortran when you would check your code and have two errors, make one change, and all of a sudden have 256 errors! I worked in my college computer lab running punch cards through a card reader for other students. Telling my age! Anyway, thanks everyone for all your help. Always greatly appreciated. The fix:

If Not IsNull(![TimeOut]) Then
TotalMin = TotalMin + DateDiff("n", !TimeIn, !TimeOut)
End If
 
can you check this out.
not related to your problem.
see MainMenu form (the Auto_Date and Auto_Time textbox).
I made them unbound and add timer event to set their value
thus making them change the time/date in real-time.
 

Attachments

This may sound like an odd question to OP, but why isn't the "Clock out" disabled if there is no "Clock in" time? I've a feeling you'll have a few cases where a user accidentally clocks out first thing in the morning as they are being a bit careless due to lack of sleep and/or caffeine.
 
I thought I had suggested this, but obviously never pressed Post.
Also if you go into the form by accident, there is no wày out, without having to enter a value for in.
 
can you check this out.
not related to your problem.
see MainMenu form (the Auto_Date and Auto_Time textbox).
I made them unbound and add timer event to set their value
thus making them change the time/date in real-time.
Thanks, I like it. Works great and makes more sense to have this way. I was going to do it in the TCForm also but noticed there is already an event procedure in On Time, I guess for the box in/out.
 
This may sound like an odd question to OP, but why isn't the "Clock out" disabled if there is no "Clock in" time? I've a feeling you'll have a few cases where a user accidentally clocks out first thing in the morning as they are being a bit careless due to lack of sleep and/or caffeine.
It is set for only clock in first. The clock out is greyed out until clock in is done.
 
I thought I had suggested this, but obviously never pressed Post.
Also if you go into the form by accident, there is no wày out, without having to enter a value for in.
The fact that an employee has to choose their name on the main menu and then click the Time Clock button in order to even get to the clock in/out form, I can't imagine they would do all that if not clocking in or out. Once clocking in or out the form auto closes. When reopened under the same name the only choice is clock out. I did have a close button on the form but decided really don't want someone to access it without doing clock in or out.
 

Users who are viewing this thread

Back
Top Bottom