I am trying to get a record count on a ADO recordset and it is not returning anything.
How do I write this?
How do I write this?
Code:
Dim adoRS As ADODB.Recordset
Set adoRS = New ADODB.Recordset
With adoRS
.Open "SELECT CaseNos.* From CaseNos WHERE (((CaseNos.Prog)=" & Val(Forms!CaseForm.OpenArgs) & ") AND ((CaseNos.Year)=" & Year(Forms!CaseForm.CaseDate) & "));"
[COLOR=red]MsgBox adoRS.RecordCount[/color]
End With