What is the value of @@ROWCOUNT after the IF (SELECT ... )?
I suspect it is 1, so you would only get 1 row before your @k is > @rows thereby ending your loop.
Try:
Code:
select @rows = count(*)
from dbo.tblActions
WHERE dbo.tblActions.acti_complete = 0
AND COALESCE(dbo.tblActions.acti_due_datetime,getdate()) < GETDATE()