Re: ClockCard application design
- From: "Mark" <mark04252REMOVE@xxxxxxxxx>
- Date: Wed, 22 Mar 2006 13:43:35 -0000
Many thanks for your advice. I have gone with the two table approach and
I'm currently writing the code for the application. The user will swipe
in/out with a clockcard. The code inserts a [TimeIn] into tblWorkPeriod if
the Employee hasn't already clocked in or the employee has already clocked
in and out earlier that day. My problem is sometimes employees work nights
and start at 10pm and finish at 6am. In my current code below the employee
would clock in at 10pm one day but when they went to clock out at 6am, this
would create another ClockIn as they day had changed. Anyway around this?
If DCount("*", "tblWorkPeriod", "[WorkDate] = #" & Date & "# And [EmpID] = "
& lngEmpId) > 0 Then
' User has already clocked in today
strSqlSel = "SELECT * FROM tblWorkPeriod WHERE [WorkDate] = #" &
Date & "# And [EmpID] = " & lngEmpId
Set rs = db.OpenRecordset(strSqlSel)
rs.MoveLast
If IsNull(rs!TimeOut) Then
TimeOut lngEmpId
Else
' User has clocked in and out already today
TimeIn lngEmpId
End If
Else
' Employee clocks in for first time
TimeIn lngEmpId
End If
.
- References:
- ClockCard application design
- From: Mark
- Re: ClockCard application design
- From: TC
- ClockCard application design
- Prev by Date: Re: How can I design business cards w/ Micro Office ?
- Next by Date: Re: Relationship of tables - compatibility
- Previous by thread: Re: ClockCard application design
- Next by thread: Re: ClockCard application design
- Index(es):
Relevant Pages
|