RecordCount is not valid unless you have loaded the entire recordset by using movelast, or unless you are using a table-type recordset.
(david)
<news[ at ]mail.adsl4less.com> wrote in message news:1157026372.913217.149500[ at ]74g2000cwt.googlegroups.com...
[Quoted Text] > Can someone please tell me where I'm going wrong? I've used getrows > before without any problems, but today, it's just not playing ball (or > more likely I've just forgotten how to do this). > > > Dim rs As Recordset > Dim arr As Variant > > Set rs = DBEngine(0)(0).OpenRecordset("SELECT fdPersonName from > tbPeople") > Debug.Print rs.RecordCount ' Returns 3 as expected > arr = rs.GetRows > Debug.Print UBound(arr, 2) + 1 ' Returns 1 instead of 3 > > A watch on arr shows an array with bounds of 0,0. >
|