View Single Post
 
Old 04-29-2012, 05:20 PM
marreco marreco is offline Windows XP Office 2007
Novice
 
Join Date: Mar 2012
Posts: 8
marreco is on a distinguished road
Default SQL ADODB.RecordSet Error 91

Hi.

Code:
Dim sTotal As String

Dim rsCount As ADODB.Recordset
'This line of error 91 "to the object variable or With block variable not set
rsCount.Open "Select Count(Bairro) from [Registros$] where Bairro = 'Centro'"
msgbox "O Total de Regsitros é " & rst(0)

sTotal = "Select Count(Bairro) from [Registros$] where Bairro = 'Centro'"
msgbox "O Total de Regsitros é " & sTotal
Reply With Quote