Array

  • Thread starter Thread starter Bruce
  • Start date Start date
B

Bruce

Hi
Is there anyway to load the primary key of a table into
array. E.g. let say we have table called part and within
this table, we have part number and part description. Part
number is primary key and they are 1, 2, 3, 4, and 5. I
want to when I open a form some how these part numbers
goes to an array on integer.
Many thanks
 
Bruce said:
Hi
Is there anyway to load the primary key of a table into
array. E.g. let say we have table called part and within
this table, we have part number and part description. Part
number is primary key and they are 1, 2, 3, 4, and 5. I
want to when I open a form some how these part numbers
goes to an array on integer.

What are you trying to accomplish? Most likely it doesn't require an
array. You could open a Recordset based on the table which will do most
everything an array would plus some things an array can't. You could load
the data into a ListBox or ComboBox if you need to let the user interact
with it. You can independently look up values from a table whenever you
need them. What specifically does the array do for you?

While I have never used it I believe you can open a Recordset and then use
GetRows to load all of the data into an array.
 
Back
Top