GetRows method

M

Marilyn

I am not returning any rows from a recordset that has 114
records with the GetRows method. What am I doing wrong?

Dim rs As DAO.Recordset
Dim db As DAO.Database
Dim lngRows as long
Dim vArray as variant

set db = currentdb
Set rs = db.OpenRecordset("tblLookUp", dbOpenSnapshot)
vArray = rs.GetRows()
lngRows = = UBound(vArray , 2) + 1

Thank you.
 
S

Sandra Daigle

Hi Marilyn,

A couple of things, one you have to tell GetRows how many rows to retreive:

vArray = rs.GetRows(999)

Second - this statement is invalid (perhaps just a typo in your post)

lngRows = = UBound(vArray , 2) + 1

It should be:

lngRows = UBound(vArray , 2) + 1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top