Ashfaque
Search Beautiful Girls from your town for night
- Local time
- Today, 14:15
- Joined
- Sep 6, 2004
- Messages
- 897
Hi,
I have a table wherein Cno (Number) and Criteria(Text) are recorded for multiple times.
Lets say Cno 1034 has 3 times violation record (LEAVING WORK AREA) in this table so it should count
I am trying to display number of records based on above 2 fields. No error but record showing zero.
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim fld As DAO.Field
Dim TotRec As Integer
Set rs = CurrentDb.OpenRecordset("SELECT COUNT(*) as TotRec FROM T_IssuedWarnings " & _
"WHERE CNo = '" & CboSearchWarn.Column(1) & "' AND Criteria = 'Criteria'")
Me.TxtWarningRecords = rs!TotRec
rs.Close
End if
Why rs!TotRec resulting 0 records while there are 3 records in the table for this 1034 Cno number.
Thanks,
I have a table wherein Cno (Number) and Criteria(Text) are recorded for multiple times.
Lets say Cno 1034 has 3 times violation record (LEAVING WORK AREA) in this table so it should count
I am trying to display number of records based on above 2 fields. No error but record showing zero.
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim fld As DAO.Field
Dim TotRec As Integer
Set rs = CurrentDb.OpenRecordset("SELECT COUNT(*) as TotRec FROM T_IssuedWarnings " & _
"WHERE CNo = '" & CboSearchWarn.Column(1) & "' AND Criteria = 'Criteria'")
Me.TxtWarningRecords = rs!TotRec
rs.Close
End if
Why rs!TotRec resulting 0 records while there are 3 records in the table for this 1034 Cno number.
Thanks,