Beror ju på hur du byggt forumet men jag skall försöka göra 2 exempel på det.
Sql = "Select Count(*) As intCount From threads where forum_Id = '"&strForumid&"'"
Set Rs = objConn.Execute(strSql)
If Not Rs.Eof Then
intThreads = Rs(0)
Else
intrThreads = 0
End If
Sql = "Select Count(*) As intCount From replyes where reply_thread_Id = '"&strThreadid&"'"
Set Rs = objConn.Execute(strSql)
If Not Rs.Eof Then
intReplys = Rs(0)
Else
intrReplys = 0
End If