Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi Dimensional Arrays

Status
Not open for further replies.

TidyTrax

Programmer
Jul 11, 2001
263
AU
I have a piece of code that reads the Field names of each table in my DB into a two dimensional array

---------------------------------------------------
ReDim FieldNames(tablesInList.ListCount, maxFields)

For x = 0 To tablesInList.ListCount - 1
tables(x) = tablesInList.ItemData(x)

Set dbs = CurrentDb
Set rs = dbs.OpenRecordset(tables(x))

For counter = 0 To rs.Fields.Count - 1
FieldNames(x, counter) = rs.Fields(counter).Name
Next counter
Set rs = Nothing
Set dbs = Nothing
Next x
-----------------------------------------------------

Now what i was wondering is how do i find out what the upper most boundary of the second dimension of the array. For a single dimension i would use UBound, but how do i find the ubound for the second dimension????
 
Why are you using a multi dimensional array ???


Rgds
Geoff
Si hoc legere scis, nimis eruditionis habes
Get the best answers to your questions - faq222-2244
 
Because i need to be able to cross reference the table and the appropriate field. It is for building dynamic queries.
 
Hi TidyTrax,
I'm not sure if I understood the question, because the way you put it the answer is to obvious. nevertheless:

Syntax

UBound(arrayname[, dimension])

example
Upper = UBound(MyArray, 1)
 
Thats not what i meant, but i have it figured out anyway!!!! Thanks anyway!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top