Query result in an "array"

johanhjalmarsso

Registered User.
Local time
Today, 03:00
Joined
Jul 12, 2005
Messages
26
Hi!

I want to put my query results in some sort of array. So I can use index and get the records I want. Is this possible?


I mean like this:
If someone clicks on a button, a query is runned and the result goes into some sort of array. Then I can select specific records and show them in subforms. I plan to have eight subforms and each for one record. (I want to do a search and then display the result as thumbnails and text in subforms, eight per page).

Regards!
Johan
 
You don't need an array... you have something called a Recordset that can hold all the records from a query or table. Search this forum on DAO and/or Recordset
 
A RecordSet is by its nature a multi-dimensional array. I would suggest that rather than doing this via code, you consider creating queries that select only what each subform needs and binding the subforms to those queries. You can probably do what you need with no code at all and end up with updatable forms to boot.
 
A true recordset is a 1-2 dimensional array (a table). But in Visual Basic, it is an object variable, holding not just fields of information, but information about its self. It's more or less, a class.
 

Users who are viewing this thread

Back
Top Bottom