M
M Shafaat
Hi,
The following code in VBA for Access functions incorrectly because the
recordset returns wrong number of records, it shows only one record, while
it should be 1500!
I would appreciate if you could explain this behaviour to me.
My VBA code:
Dim rsRoutes As Recordset
dim SQLStr As String
SQLStr = "SELECT DISTINCT RouteNumber FROM Routes ORDER BY RouteNumber"
Set rsRoutes = CurrentDb.OpenRecordset(SQLStr)
For i = 1 To rsRoutes.RecordCount
.. Do something
Next
Regards
M Shafaat
The following code in VBA for Access functions incorrectly because the
recordset returns wrong number of records, it shows only one record, while
it should be 1500!
I would appreciate if you could explain this behaviour to me.
My VBA code:
Dim rsRoutes As Recordset
dim SQLStr As String
SQLStr = "SELECT DISTINCT RouteNumber FROM Routes ORDER BY RouteNumber"
Set rsRoutes = CurrentDb.OpenRecordset(SQLStr)
For i = 1 To rsRoutes.RecordCount
.. Do something
Next
Regards
M Shafaat