Public Sub test()
Dim db As DAO.Database
Dim rst As DAO.Recordset
Set db = CurrentDb
Set rst = db.OpenRecordset("SELECT Somefield FROM SomeQuery WHERE ID=" & Forms![MyForm]![CodeID] & " AND Field2 like 'Ç.2*'"
Debug.Print rst.RecordCount
End Sub
This gives me always the total number of records returned from SomeQuery. No rst.MoveLast, no nothing. I thought the logical would be to return 1 if records are returned or 0 if there are no records.
Thanks in advance for help.
Dim db As DAO.Database
Dim rst As DAO.Recordset
Set db = CurrentDb
Set rst = db.OpenRecordset("SELECT Somefield FROM SomeQuery WHERE ID=" & Forms![MyForm]![CodeID] & " AND Field2 like 'Ç.2*'"
Debug.Print rst.RecordCount
End Sub
This gives me always the total number of records returned from SomeQuery. No rst.MoveLast, no nothing. I thought the logical would be to return 1 if records are returned or 0 if there are no records.
Thanks in advance for help.