smilemax
Computer
- Dec 21, 2001
- 2
I am trying to get the values from a table in my access database
and store it in a variant for processing
But I am not able to get the rows returned
I have a table which just has one field but has 6 records.
I am trying to get these 6 values. but when I do the foll only the first
record is returned and the recordcount =1 !! instead of 6
Here is the code I am using to do this
Let me know where I am wrong
**********************************
dim querystr as String
dim db..
dim qd..
dim rs ..
dim vari as Variant
Set db = OpenDatabase("VLGSCHEDULE.mdb"
Set qd = db.CreateQueryDef("h", querystr)
Set rs = db.OpenRecordset("h"
With rs
vari= .getrows(.RecordCount)
end with
For i = 0 To (UBound(vari, 1))
debug.print vari(0,i)
Next i
*******************************************
and store it in a variant for processing
But I am not able to get the rows returned
I have a table which just has one field but has 6 records.
I am trying to get these 6 values. but when I do the foll only the first
record is returned and the recordcount =1 !! instead of 6
Here is the code I am using to do this
Let me know where I am wrong
**********************************
dim querystr as String
dim db..
dim qd..
dim rs ..
dim vari as Variant
Set db = OpenDatabase("VLGSCHEDULE.mdb"
Set qd = db.CreateQueryDef("h", querystr)
Set rs = db.OpenRecordset("h"
With rs
vari= .getrows(.RecordCount)
end with
For i = 0 To (UBound(vari, 1))
debug.print vari(0,i)
Next i
*******************************************