New Array

P

Pam

How do I start to fill a 3-dimensional array.

I have a table with column 1 = name
column 2 = office symbol
column 3 = project(s) assigned to

I want a ComboBox to choose the name from
then fill two textboxes with the information from columns
2 and 3 that go with the name chosen in column 1.

How do i build the array
 
J

John

Pam,
If I understand what you're trying to do, I think I'd go with three
individual arrays representing each column's data. You don't need a
three dimensional array - it is a waste of memory. I would set up the
arrays something like this:
column 1 - Nam(i)
column 2 - Sym(i)
column 3 - Prj(i)
where "i" is the index (i.e. number of elements in the arrays)

If you use a three dimensional array you might have something like this:
DatArr(i,j,k). However most the the elements do not exist. For example,
DatArr(1,1,1) is valid, but DatArr(1,2,1) is not. In other words, the
first name matches up with the first office symbol and first assigned
project but the first name does not match up with the second office
symbol and the first project. Therefore, only matched values (i.e.
DatArr(1,1,1), DatArr(2,2,2), DatArr(3,3,3), etc.) will exist and all
other array elements will not be used but memory will still be allocated
for them. Does this make sense?

Hopefully I understood your issue and hopfully this helps.
John
 
P

Pam

Thanks John, I am just not real familiar with arrays. I
will attempt the do the three individual arrays, less
loading time.

PAM
 

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