|
-
Mar 3rd, 2001, 09:55 AM
#1
Thread Starter
Addicted Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|