Help with SQL Statement (1 Viewer)

ecupirate

Registered User.
Local time
Today, 03:05
Joined
Apr 19, 2002
Messages
14
In a module, I'm trying to count 1/2 Sick Days and Sick Days(which would be a full day). The below statement will count Sick Days in the table. How do I change to count 1/2 sickdays as 1/2 and sick days as 1. Example in the table I have:

tblInput Table InputText field :

Sick Day
1/2 Sick Day

"I want to output 1 1/2 sick days"

strSQL = "SELECT Count(InputID) AS TotDays FROM tblInput "
strSQL = strSQL & "WHERE ((Month([InputDate])=" & CInt(gstrMonth) & ") AND ((tblInput.UserID)=" & glngUserID & ") AND ((tblInput.InputText) Like '*Sick Day*'));"
Set rs = db.OpenRecordset(strSQL, dbOpenSnapshot)
frm!txtHolMo = rs!TotDays
rs.Close

Thanks in Advance..:confused:
 

ecupirate

Registered User.
Local time
Today, 03:05
Joined
Apr 19, 2002
Messages
14
I would, but I display the text values in the calander and on some reports. I'm just learning SQL and thought there might be a way to code in the statement..

Thanks..
 

Users who are viewing this thread

Top Bottom