skiphooper
Registered User.
- Local time
- Yesterday, 20:08
- Joined
- Nov 29, 2000
- Messages
- 76
HI Everyone.
I changed the following function, and can't get it to work at all.
Public Function GetRangedays()
Dim strSQL
Dim frm As Form
Dim db As Database
Dim rs As Recordset
Set frm = Forms!frmCalender
Set db = CurrentDb
' Vacation
' The next line was changed , adding between startingdate
' and endingdate
' syntax error
' _____________________________________
strSQL = "SELECT Count(InputID) AS TotDays FROM tblInput "
strSQL = strSQL & "WHERE (([tblInput]![InputDate] Between " & "([forms]![frmChoose]![StartingDate])" & " AND ([forms]![frmchoose]![EndingDate])" & " AND ([tblInput]![UserID]=" & glngUserID & ") AND ((tblInput.InputText = 'Vacation'));"
' _______________________________________________
Set rs = db.OpenRecordset(strSQL, dbOpenSnapshot)
frm!txtVacTot = rs!TotDays
rs.Close
strSQL = "'"
Set rs = Nothing
db.Close
Set db = Nothing
End Function
Thanks in Advance
Skip
I changed the following function, and can't get it to work at all.
Public Function GetRangedays()
Dim strSQL
Dim frm As Form
Dim db As Database
Dim rs As Recordset
Set frm = Forms!frmCalender
Set db = CurrentDb
' Vacation
' The next line was changed , adding between startingdate
' and endingdate
' syntax error
' _____________________________________
strSQL = "SELECT Count(InputID) AS TotDays FROM tblInput "
strSQL = strSQL & "WHERE (([tblInput]![InputDate] Between " & "([forms]![frmChoose]![StartingDate])" & " AND ([forms]![frmchoose]![EndingDate])" & " AND ([tblInput]![UserID]=" & glngUserID & ") AND ((tblInput.InputText = 'Vacation'));"
' _______________________________________________
Set rs = db.OpenRecordset(strSQL, dbOpenSnapshot)
frm!txtVacTot = rs!TotDays
rs.Close
strSQL = "'"
Set rs = Nothing
db.Close
Set db = Nothing
End Function
Thanks in Advance
Skip