need help with this

  • Thread starter ياسر
  • Start date
P

psc

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top