S
SoggyCashew
I have a module that counts how many times a word is used in the table
tblInput and show the number in a text box on my form. for this example I
wnat to use the word "Half Day" and have it show in a text box "txtHD". Here
is what im using to show the value as 1 but how do I show it as .5.
Public Function GetVacationAndHolidays()
Dim strSql
Dim frm As Form
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set frm = Forms!frmCalendar
Set db = CurrentDb
Set frm = Forms!frmCalendar
Set db = CurrentDb
'Half Day
strSql = "SELECT Count(InputID) AS TotDays FROM tblInput "
strSql = strSql & "WHERE ((Format([InputDate], 'yyyy')=" &
CInt(gstrYear) & ") AND ((tblInput.UserID)=" & glngUserID & ") AND
((tblInput.InputText)='Half Day'));"
Set rs = db.OpenRecordset(strSql, dbOpenSnapshot)
frm!txtHD = rs!TotDays
rs.Close
strSql = "'"
Set rs = Nothing
db.Close
Set db = Nothing
End Function
tblInput and show the number in a text box on my form. for this example I
wnat to use the word "Half Day" and have it show in a text box "txtHD". Here
is what im using to show the value as 1 but how do I show it as .5.
Public Function GetVacationAndHolidays()
Dim strSql
Dim frm As Form
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set frm = Forms!frmCalendar
Set db = CurrentDb
Set frm = Forms!frmCalendar
Set db = CurrentDb
'Half Day
strSql = "SELECT Count(InputID) AS TotDays FROM tblInput "
strSql = strSql & "WHERE ((Format([InputDate], 'yyyy')=" &
CInt(gstrYear) & ") AND ((tblInput.UserID)=" & glngUserID & ") AND
((tblInput.InputText)='Half Day'));"
Set rs = db.OpenRecordset(strSql, dbOpenSnapshot)
frm!txtHD = rs!TotDays
rs.Close
strSql = "'"
Set rs = Nothing
db.Close
Set db = Nothing
End Function