need help with this

  • Thread starter Thread starter ياسر
  • Start date Start date
Explan more better if possible ....but it sounds let a quick take, yes?
\... ^..^ psc>ft<
ياسر said:
Sorry Not Working What can i do ?
its continue working with any number entered for one row and many rows!

John W. Vinson said:
Thanks but thats not working
i have entered about three records for the same idnumber with different
tasks for the same time but different hours but i didn't active the
code you
write to me

OK, try this:

Private Sub Form_BeforeUpdate(Cancel as Integer)
If DSum("[regular time]", "[Employee Weekly Hours]", _
"[Idnumber] = '" & Me!Idnumber] & "' AND DateValue([Dates]) = #" _
& DateValue(Me![Dates]) & "#") _
+ NZ(Me![regular time] > 8 Then
MsgBox "No more than 8 hours regular time allowed", vbOKOnly
Cancel = True
End If
End Sub
 
Back
Top