Cordial saludo,
soy muy novato en acces y necesito mediante un contador las hombres y mujeres que hay en una tabla.
No me sirve consulta pues es al presionar un boton para generar esta estadistica. Esto e slo que he hecho atarve sd ela sayuda pero igual no me funciona.
agardezco su colaboracion
Private Sub Comando40_Click()
'Dim db As Database
'Dim rst1 As ADODB.Recordset
Set rst1 = New ADODB.Recordset
Dim cf, cm, ac, total As Integer
ch = 0
cm = 0
With rst1
.ActiveConnection = "Provider =microsoft.Jet.OLEDB.4.0; data source= c:\juventud.mdb;"
.Open "integrantes", , , , adCmdTable
End With
Do Until rst1.EOF
If genero = femenino Then
cf = cf + 1
If (genero = masculino) Then
cm = cm + 1
End If
End If
rst1.MoveNext
Loop
Set rst1 = Nothing
MsgBox ("Total Mujeres:")
MsgBox (cm)
MsgBox (ch)
End Sub