Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Access field order using ADO
Please help if possible.
I need to retrieve the field names in an Access database using ADO, BUT, I need them in the order in which they appear in the database from left to right. It seems that the code I'm using alphabetizes them. Your example code would be MOST appreciated. Thanks in advance. My code follows: Function ADOAccessFieldList(argFullName As String, argTableName As String) Dim cat As New ADOX.Catalog Dim tbl As ADOX.Table Dim fld As ADOX.Column Dim flds As ADOX.Columns Dim arrFields() As Variant Dim lngX As Long cat.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & argFullName & ";" Set tbl = cat.Tables(argTableName) Set flds = tbl.Columns For Each fld In flds lngX = lngX + 1 ReDim Preserve arrFields(lngX) arrFields(lngX) = fld.Name Next fld ADOAccessFieldList = arrFields End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pivot Table field selection order | Excel Discussion (Misc queries) | |||
Pivot table row field order | Excel Discussion (Misc queries) | |||
I know its not access, but...(tab order) | Excel Discussion (Misc queries) | |||
Order of Pivot Drop-Down (Page Field) | Excel Discussion (Misc queries) | |||
Pivot Table Ascending Order of Row Field | Excel Discussion (Misc queries) |