sSQL = "SELECT tblStartFinish.Status FROM tblStartFinish WHERE (((tblStartFinish.StaffID)=" & rstCCS(15) & ") AND "
sSQL = sSQL & "((tblStartFinish.Date) Between " & ConvertDate(dteDate2) & " And " & ConvertDate(dteDate1) & " AND "
sSQL = sSQL & "((tblStartFinish.Status)='nd' Or (tblStartFinish.Status)='nn' Or (tblStartFinish.Status)='bl' "
sSQL = sSQL & "Or (tblStartFinish.Status)='cl' Or (tblStartFinish.Status)='pl')));"
Set rstISU = dbCCS.OpenRecordset(sSQL)
rstISU.MoveLast
rstISU.MoveFirst
iRecordCount = rstISU.RecordCount
I am constantly getting the wrong recordcount. When 4 recs are getting returned, iRecordCount is showing 3.
Also, before the MoveLast and MoveFirst are getting executed, the rstISU.recordcount is showing 260 for the first time, second time 330, but then when the the recordset gets populated (ie movelast and movefirst), the iRecordCont always shows one less than there should be (ie i copy the sql, and paste it into the sql window, thats how i know there is 1 record than there should be)
Very strange,
Cheers
Nick
Nick (Everton Rool OK!)
sSQL = sSQL & "((tblStartFinish.Date) Between " & ConvertDate(dteDate2) & " And " & ConvertDate(dteDate1) & " AND "
sSQL = sSQL & "((tblStartFinish.Status)='nd' Or (tblStartFinish.Status)='nn' Or (tblStartFinish.Status)='bl' "
sSQL = sSQL & "Or (tblStartFinish.Status)='cl' Or (tblStartFinish.Status)='pl')));"
Set rstISU = dbCCS.OpenRecordset(sSQL)
rstISU.MoveLast
rstISU.MoveFirst
iRecordCount = rstISU.RecordCount
I am constantly getting the wrong recordcount. When 4 recs are getting returned, iRecordCount is showing 3.
Also, before the MoveLast and MoveFirst are getting executed, the rstISU.recordcount is showing 260 for the first time, second time 330, but then when the the recordset gets populated (ie movelast and movefirst), the iRecordCont always shows one less than there should be (ie i copy the sql, and paste it into the sql window, thats how i know there is 1 record than there should be)
Very strange,
Cheers
Nick
Nick (Everton Rool OK!)