D
DS
I need to change may records with the same date. This code works for
one record but I need to change all of the Time In fields for all
records with one Date. Here is the code...
Dim dteTimeIn As Date
Dim dteRoundedTime As Date
Dim ONESQL As String
dteTimeIn = Forms!frmTimeCardAdjust!TxtTimeIn
dteRoundedTime = RoundTime(dteTimeIn)
DoCmd.SetWarnings False
ONESQL = "UPDATE tblTimeLog SET tblTimeLog.LogTimeIn = #" &
dteRoundedTime & "# " & _
"WHERE tblTimeLog.LogDateIN = " & Forms!frmTimeCardAdjust!TxtDate1 & ";"
DoCmd.RunSQL (ONESQL)
DoCmd.SetWarnings True
Forms!frmTimeCardAdjust!ListEdit.Requery
DoCmd.Close acForm, "frmTimeAdjustSelect"
Any hel appreciated,
Thanks
DS
one record but I need to change all of the Time In fields for all
records with one Date. Here is the code...
Dim dteTimeIn As Date
Dim dteRoundedTime As Date
Dim ONESQL As String
dteTimeIn = Forms!frmTimeCardAdjust!TxtTimeIn
dteRoundedTime = RoundTime(dteTimeIn)
DoCmd.SetWarnings False
ONESQL = "UPDATE tblTimeLog SET tblTimeLog.LogTimeIn = #" &
dteRoundedTime & "# " & _
"WHERE tblTimeLog.LogDateIN = " & Forms!frmTimeCardAdjust!TxtDate1 & ";"
DoCmd.RunSQL (ONESQL)
DoCmd.SetWarnings True
Forms!frmTimeCardAdjust!ListEdit.Requery
DoCmd.Close acForm, "frmTimeAdjustSelect"
Any hel appreciated,
Thanks
DS