Hi,

How can I get the number of records in a recordset?
I'm using ADO.

This is my code:

Rst.Open "Select PREmp.*, PRFil.EmpCod, PRFil.FilCod, PRFil.FilIde FROM PREmp INNER JOIN PRFil ON PREmp.EmpCod = PRFil.EmpCod", Connec

If Rst.RecordCount = 0 Then
vString = "No records available"
Combo1.AddItem vString
End If

Combo1.Text = Combo1.List(0) ' Show the first item

Note: the query above also can return an empty result.

When no records are returned, the message "No records avalilabe" should be inserted in the Combo, but it's not.
Is the RecordCount property ok? What's wrong in my code above?

Thanks,

Michel Jr.