eXpired
Toilet Drinker

Joined: 13 Mar 2003 Posts: 376
Location: Work
|
Posted:
Mon Jul 14, 2003 11:46 pm Post subject: VBA: dbOpenDynaset |
|
The query "E_G" contains 5 rows, but when I debug the code; rst.RecordCount always gets 1. Why is that and how do I avoid it?
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("E_G", dbOpenDynaset)
m = 0
i = 1
j = rst.RecordCount
If j = 0 Then
MsgBox "Error"
Exit Sub
End If
IValue = 100 / j
For i = 1 To j
If i = 1 Then
rst.MoveFirst
Else
rst.MoveNext
End If
|
_________________ -- I swear to drunk I'm not God!
|
|