RE:CONTAR REGISTROS DE TEXTO
He tratado de hacerlo por consulta paro no le hayo pero haciendolo por medio de una lectura secuencial con un Record Set si lo hace, ya lo probe, En tabla1 tengo 6 campos Clave(campo de llave), A1, A2, A3, A4 (los cuales tienen capturados X en algunos registros) y el campo TotalReq (que es el resultado del conteo), te envío el codigo y espero que te sirva.
Option Compare Database
Dim c_Reg As Double
Dim wEOF As Boolean
Dim db As DAO.Database, rs As DAO.Recordset
Private Sub Comando1_Click()
Set db = CurrentDb()
Set rs = db.OpenRecordset("SELECT Tabla1.Clave, Tabla1.A1, Tabla1.A2, Tabla1.A3, Tabla1.A4, Tabla1.TotalReq FROM Tabla1")
If rs.RecordCount > 0 Then
wEOF = True
Do While wEOF = True
If rs.EOF Then
wEOF = False
Else
c_Reg = 0
If rs!A1 = "X" Then
Suma
End If
If rs!A2 = "X" Then
Suma
End If
If rs!A3 = "X" Then
Suma
End If
If rs!A4 = "X" Then
Suma
End If
If c_Reg > 0 Then
BeginTrans
rs.Edit
rs!TotalReq = c_Reg
rs.Update
CommitTrans
End If
rs.MoveNext
End If
Loop
Else
MsgBox "No hay registros para ser procesados..... ", vbInformation, "Aviso"
rs.Close
Set db = Nothing
Exit Sub
End If
rs.Close
Set db = Nothing
End Sub
Sub Suma()
c_Reg = c_Reg + 1
End Sub
Private Sub Comando0_Click()
DoCmd.Close
End Sub