E
eb1mom
I have this code in a form, it calculates how many vacation
hours an employee has avaliable. Wtime is datediff between
hired date and today. I am trying to rework this code and
use in a query for same result. I have Wtime field in query
working fine but, getting the syntax correct for the
lenghty vacation hours field is not going well. Syntax help
would be appreciated. thank you
If WTime >= 1 And WTime < 3 Then
Me.vacationhours = 80
End If
If WTime >= 3 And WTime < 5 Then
Me.vacationhours = 100
End If
If WTime >= 5 And WTime < 10 Then
Me.vacationhours = 120
End If
If WTime >= 10 And WTime < 15 Then
Me.vacationhours = 136
End If
If WTime > 15 Then
Me.vacationhours = 160
hours an employee has avaliable. Wtime is datediff between
hired date and today. I am trying to rework this code and
use in a query for same result. I have Wtime field in query
working fine but, getting the syntax correct for the
lenghty vacation hours field is not going well. Syntax help
would be appreciated. thank you
If WTime >= 1 And WTime < 3 Then
Me.vacationhours = 80
End If
If WTime >= 3 And WTime < 5 Then
Me.vacationhours = 100
End If
If WTime >= 5 And WTime < 10 Then
Me.vacationhours = 120
End If
If WTime >= 10 And WTime < 15 Then
Me.vacationhours = 136
End If
If WTime > 15 Then
Me.vacationhours = 160