babyrock2009 > 07-09-13, 09:18 AM
babyrock2009 > 07-09-13, 09:28 AM
MTNQ > 07-09-13, 02:48 PM
If (sldain = 0) Then
SQL = "Insert Into SoLanIn(EMPCD, ENNAME, LanIn, GioIn) Values('" & Me.EMPCD & "','" & Me.ENNAME & "',1," & "#" & Now & "#)"
DoCmd.RunSQL SQL
Else
DoCmd.RunSQL "Update SoLanIn Set LanIN=" & sldain + 1 & ",GioIn=#" & Now & "# Where EMPCD='" & Me.EMPCD & "'"
End If
Dim n As String
n = Format(Date, "dd/mm/yyyy") & " " & Format(Time, "hh:mm")
If (sldain = 0) Then
SQL = "Insert Into SoLanIn(EMPCD, ENNAME, LanIn, GioIn) Values('" & Me.EMPCD & "','" & Me.ENNAME & "',1,'" & n & "')"
DoCmd.RunSQL SQL
Else
DoCmd.RunSQL "Update SoLanIn Set LanIN=" & sldain + 1 & ",GioIn='" & n & "' Where EMPCD='" & Me.EMPCD & "'"
End If