counting values in tables

  • Thread starter Thread starter Dean
  • Start date Start date
D

Dean

I have the following code in a db, we use it for vacation
tracking. I need it to count the half days as well as the
whole days. It previously counted just the whole days. I
have changed this part "AND tblVacation.NO_DAYS <> .5"
to what i thought would count all days. If i change
the .5 to 0, it counts the records not the values i have
different varitions with the operators <= >= and 1 and 5
nothing it either counts whole days (1) or the number of
records. Any ideas?

thanks
Dean

strSQLCountPeople = _
"SELECT tblVacation.SENIORITY_NUMBER, " & _
" tblVacation.REQUEST_DATE, " & _
" tblEmployeePasswords.SHIFT " & _
"FROM tblEmployeePasswords INNER JOIN tblVacation
ON " & _
" tblEmployeePasswords.SENIORITY_NUMBER = "
& _
" tblVacation.SENIORITY_NUMBER " & _
"WHERE tblVacation.REQUEST_DATE = " & "#" &
dtmRequestDate & "# " & _
" AND tblEmployeePasswords.SHIFT = " & conQuote &
strShift & conQuote & _
" AND tblVacation.NO_DAYS <> .5 " & _
" AND tblEmployeePasswords.DEPT NOT IN (" &
conQuote & "04" & conQuote & "," & _
")"
 
-----Original Message-----
I have the following code in a db, we use it for vacation
tracking. I need it to count the half days as well as the
whole days. It previously counted just the whole days. I
have changed this part "AND tblVacation.NO_DAYS <> .5"
to what i thought would count all days. If i change
the .5 to 0, it counts the records not the values i have
different varitions with the operators <= >= and 1 and 5
nothing it either counts whole days (1) or the number of
records. Any ideas?

thanks
Dean
Hi Dean, is it a count you want or sum?

Luck
Jonathan
 
I want it to let people sign up for vacation until it
reaches a certain number lets say 15 and then when that
day is full it will give message that that can't sign up
it's full.....i guess i need a sum.

Thanks
 
Back
Top