Hello,
I'm trying to figure out how to create an array of controls in VB Express. I've read that somehow there's an automated way to do this (as in VB6, I presume, but I've never worked in VB6 either), but I can't find anywhere that describes it.
Basically, I have a table that I've created on one of my forms that is 18x20 cells. It would be really helpful if I could use an array to populate my table rather than having to write 360 lines of code (this is just a test database, so I only have 18 cases -- and I want to have a more succinct way of doing this for when I need to expand the functionality of my program to include more data).
For example, I'm currently populating the table one cell at a time as follows (it does the job, but it's cumbersome):
pid1.Text = rawdataRow(dist(0,1)).pid
ht1.Text = rawdataRow(dist(0,1)).ht
wt1.Text = rawdataRow(dist(0,1)).wt
etc.
where rawdataRow is reading the rows from my database, and dist(0,1) is the index from a distance matching function that indicates which row I should be retrieving info from, and pid1, etc. rep the specific cell in my table.
Any ideas

creating array of controls (labels) in VB Express
Kasinathan
As I mentioned in the earlier post, if you are new to Visual Basic you really should strat out by working through the Guided Tour - it will give you enough background to get started.
- Steve Hoag
Simpzon
Is there a better way to do this Does the DataGridView control allow you to sort the cases first
Thanks for your help!
aaronmarissa
If this is new to you, I suggest that you start by working through the "Managing Your Records" section of the Visual Basic Guided Tour for an introduction to working with databases: http://msdn2.microsoft.com/en-us/library/t25kbx0s(en-US,VS.80).aspx
Hope this helps,
Steve Hoag
Visual Basic Express