Tema: count
Ver Mensaje Individual
  #5 (permalink)  
Antiguo 10/03/2009, 11:13
Avatar de rulsanchez
rulsanchez
 
Fecha de Ingreso: octubre-2008
Ubicación: Manchester
Mensajes: 64
Antigüedad: 15 años, 6 meses
Puntos: 0
Respuesta: count

Prueba esto compi:


Dim Sql as String
Dim Rs as New Recordset
Dim Conexion as ADODB.Connection
'Ponle un nombre a esa columna para que luego en el RS.Fields puedas hacer referencia
SQL="SELECT COUNT(CODIGO) as CuentaCodigo FROM CONTACTOS"
RS.Open SQL, Conexion, adOpenStatic, adLockReadOnly

'Ahora miras si te devuelve algo la consulta si es asi lo muestras
If Not RS.EOF Then

Tulabel.Caption=RS.Fields("CuentaCodigo")

End if


Prueba y me cuentas ;)