Hello!
Okay, so I managed to successfully create a new .mdb file with ADOX (yay!), and also managed to create tables and fields using the .Append method. All fine and dandy, HOWEVER, the field names in the Access file are now alphabetically ordered. Is there any way to do this, so the columns show up in the same way I ordered them, when I called the Append method?
Here's what my code looks like so far...
With LocationTable
'.............................................
.Name = "Location"
With .Columns
'.............................................
.Append "ID", adInteger
.Append "Name", adVarChar
.Append "X", adVarChar
.Append "Y", adVarChar
.Append "Z", adVarChar
.Append "T", adVarChar
.Append "Group", adVarChar
'.............................................
End With
'.............................................
End With
Now, when I open up the resulting Access file, guess what? 'Group' is now in my first column and 'T' comes before 'X', 'Y' and 'Z'! I know I'm missing something or doing something grossly incorrect! Can anybody please help me with my otherwise seemingly paltry dilemma? =)
Thanks!
Lego Piece
Okay, so I managed to successfully create a new .mdb file with ADOX (yay!), and also managed to create tables and fields using the .Append method. All fine and dandy, HOWEVER, the field names in the Access file are now alphabetically ordered. Is there any way to do this, so the columns show up in the same way I ordered them, when I called the Append method?
Here's what my code looks like so far...
With LocationTable
'.............................................
.Name = "Location"
With .Columns
'.............................................
.Append "ID", adInteger
.Append "Name", adVarChar
.Append "X", adVarChar
.Append "Y", adVarChar
.Append "Z", adVarChar
.Append "T", adVarChar
.Append "Group", adVarChar
'.............................................
End With
'.............................................
End With
Now, when I open up the resulting Access file, guess what? 'Group' is now in my first column and 'T' comes before 'X', 'Y' and 'Z'! I know I'm missing something or doing something grossly incorrect! Can anybody please help me with my otherwise seemingly paltry dilemma? =)
Thanks!
Lego Piece