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!

Change Field Order in Table by Code 1

Status
Not open for further replies.

Pampers

Technical User
Apr 7, 2004
1,300
AN
Hi Everyone,
I have a little form with a button to modify/create tables and field in a back end of database. I have some code to add a field to a table. That works fine except that it adds this new field always on the bottom. Can I influence were the field is placed within the field-collection the table?



Pampers [afro]
Keeping it simple can be complicated
 
Who cares the place of a field in a table ????
Always use a query to display the data in any column order you want.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Eh, I...
I Like to have the field names in the table grouped i certain way

Pampers [afro]
Keeping it simple can be complicated
 
Have a look at the OrdinalPosition property of the DAO.Field object.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Will do, thanx PHV

Pampers [afro]
Keeping it simple can be complicated
 
Yep, works.

Example:

tdf.Fields("test").OrdinalPosition = 0

Pampers [afro]
Keeping it simple can be complicated
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top