General information
Category:
Internet applications
This is not ADO, it's DAO. Furthermore this is Access/VBA (judging by the CurrentDB call) code, this should really go on the VB forum instead.
Anyway, if I remember correctly the way you get the correct record count from a DAO snapshot-type recordset is by doing .Movelast and .Movefirst before checking .recordcount. HTH
>Hi all, can anyone tell me why I am getting 5 results back from my rsDiv query and only one result back from my rsProdLine query? Has anyone encountered this type of behaviour before? Am I using the wrong syntax? I'm pretty new to ADO soo..... btw - it is an access db not a foxpro db...
>
>
>Dim db As Database
>Dim rsDiv As Recordset
>Dim rsProdLine As Recordset
>
>Set db = CurrentDb
>Set rsDiv = db.OpenRecordset("select distinct division as div " + _
> "from productline]")
>Set rsProdLine = db.OpenRecordset("select productline " + _
> "from productline")
>
>MsgBox rsDiv.RecordCount
>MsgBox rsProdLine.RecordCount
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only