Read a table to an array

  • Thread starter Thread starter JattilaB
  • Start date Start date
J

JattilaB

how can I read a tabel to an arry?
I would like to achive this wiht in a vb code inside the database...?
 
Please do not multi-post into more than one group.



how can I read a tabel to an arry?
I would like to achive this wiht in a vb code inside the database...?
 
Take a look at the GetRows Method (DAO) which Retrieves multiple rows from a
Recordset object. To view the help, open a module then click help and search
for help on GetRows.

Having said this, usually I find it's easier to work with the recordset
itself - is it possible that you could just use a recordset?
 
Ok I found that and I have it working to some part but...

hoe can I tell it read a different table then the one I am currently working
with in my existing form?

I have the array the way I want it... but now I would like to refrence it to
another table besides the default one


make sense?
Sandra Daigle said:
Take a look at the GetRows Method (DAO) which Retrieves multiple rows from a
Recordset object. To view the help, open a module then click help and search
for help on GetRows.

Having said this, usually I find it's easier to work with the recordset
itself - is it possible that you could just use a recordset?

--
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.

how can I read a tabel to an arry?
I would like to achive this wiht in a vb code inside the database...?
 
You would open a recordset on the desired table - something like this:

dim db as dao.database
dim rst as dao.recordset
set db=currentdb()
set rst=db.openrecordset("Select Custid, CustName from tblCustomers;")
.. . .
'use the recordset
.. . .
rst.close
set rst=nothing
set db=nothing

--
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.

Ok I found that and I have it working to some part but...

hoe can I tell it read a different table then the one I am currently
working with in my existing form?

I have the array the way I want it... but now I would like to
refrence it to another table besides the default one


make sense?
Sandra Daigle said:
Take a look at the GetRows Method (DAO) which Retrieves multiple
rows from a Recordset object. To view the help, open a module then
click help and search for help on GetRows.

Having said this, usually I find it's easier to work with the
recordset itself - is it possible that you could just use a
recordset?

--
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.

how can I read a tabel to an arry?
I would like to achive this wiht in a vb code inside the
database...?
 
Back
Top