Array

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
 
R

Rick Brandt

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.
 

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