Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Visual Basic DBGRID row count

0 views
Skip to first unread message

Dr. Laurence Leff

unread,
Feb 8, 1998, 3:00:00 AM2/8/98
to

We have some questions about DBGRID in Visual Basic Five.

We have a DBGRID in our program. We have it retrieving information
from our database with a statement such as:


temp1text = "select * from oder where oder.customerno='" & Text1.Text & "'"
Data3.RecordSource = temp1text
Debug.Print "data3.recordsource", Data3.RecordSource
Set rs = Data3.Recordset
Data3.Refresh

The Database Grid has its data source set to "Data3"

How do we find out how many rows we retrieved in the database grid

I assume we can write:
rowcount = DBGrid.RecourdSource.RecordCount
or
rowcount = DBGrid.rowcount

However, My Visual Basic Five isn't accepting either of hte above.

SForbes657

unread,
Feb 9, 1998, 3:00:00 AM2/9/98
to

Dr. Laurence:


numberOfRecordsReturned = Data3.RecordSet.RecordCount

'the data control has the information you need not the DBGrid
----

Shane Forbes
Norwalk, CT

0 new messages