473,473 Members | 1,750 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Creating array to recordset

Hello all,

I have 3 tables with 1 field in each. The third table has half a
million rows in it so I can do this with excel. What I want to do is
create an array that I can export to Excel. The data is as follows:

Table 1: C1, C2
Table 2: M1, M2, M3
Table 3: L1, L2, L3, L4, L5, L6

The problem is that I want each value for Table 1 on the side and each
value for Table 2 on the top as headings with Table 3 filling in the
data. There is a relationship that needs to be held. For this data,
the results I want would look like:

M1 M2 M3
C1 L1 L2 L3
C2 L4 L5 L6
I can't seem to figure this out in Access vba. Any pointers or help is
appreciated.

Dec 28 '06 #1
1 8385
Ok, I was able to create the array I think but now I need to do the
following. The array is 591 rows by 971 columns and null values are
not possible.

I need to find the the highest value for each column and if possible
find out what row that falls on. In the end I'd like to have a table
that is 971 records where each record is the highest number found in
that column (1 - 971) kind of like the following:

Record 1 .35 Row 482
Record 2 .56 Row 2
Record 3 .0001 Row 99
*
*
Record 971 .056 Row 311
Here is what I have so far for getting the array.-------------

Sub check()
Dim Con As Recordset
Dim lodf As Recordset
Dim mon As Recordset
Dim mystuff(591, 971) As Double
Dim c As Integer
Dim m As Integer
Dim I As Integer
Set db = CurrentDb
Set lodf = db.OpenRecordset("Ltable")
Set Con = db.OpenRecordset("Ctable")
Set mon = db.OpenRecordset("Mtable")

lodf.MoveFirst
For c = 1 To 591
For m = 1 To 971
mystuff(c, m) = lodf![LField]
lodf.MoveNext
Next m
Next c
End Sub

Dec 28 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Faheem Mitha | last post by:
Dear People, I have the current modest goal. Given a user defined class, I want to creata an array of instances of that class. Consider the following class. class cell: def...
23
by: Rob Meade | last post by:
Lo all, Ok - this is what I was aiming to do, and then I thought - naahhh, that cant be right! query database results to recordset results to array using GetRows update values in one column...
6
by: Bhavin | last post by:
Anybody quickly replies it, would be a great help! I try to create dynamic array of textboxes control in ASP.NET(C#). I got the following error while I tried to assign value to ID property of...
9
by: sci | last post by:
I believe both ways to create an array of strings are correct. Is there any difference between these two? 1. char *MyString = {"First string", "Second string", ..."Tenth string"}; 2. char...
1
by: Chris | last post by:
Hi, to create an array of 2 objects (e.g. of type '__gc class Airplane') I need to do : Airplane * arrAirplanes __gc = new Airplane* __gc; arrAirplanes = new Airplane("N12344"); arrAirplanes...
1
by: Andrew Poulos | last post by:
If I have an array whose elements may or may not also be arrays and I’m given a string that relates to an appropriate index in that array how do I use that string as the index? For example, if I...
15
by: Madhur | last post by:
Hi All, I would like you help me in creating an array of data types. I am interested in look at the the data type which looks like this Array...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.