matrixindicator
IS-IT--Management
Code:
strSQLClose = "SELECT T3A_TODO.refIDRQ, T3A_TODO.TaskYN, Count(T3A_TODO.TaskTitle) AS CountTaskTitle " _
& "FROM T3A_TODO " _
& "GROUP BY T3A_TODO.refIDRQ, T3A_TODO.TaskYN " _
& "HAVING (((T3A_TODO.refIDRQ)= " & strForm & " AND ((T3A_TODO.TaskYN)=Yes)));"
Set rst = dbs.OpenRecordset(strSQLClose, dbOpenDynaset)
If rst.BOF > 0 Then
intCountTasksClose = rst!CountTasktitle
Else
intCountTasksClose = 0
End If
How to say if there is not a record count, found for the condition set a 0, else show the numbers that match the condition. Now he is generating the error message "no current record".