PDA

Click to See Complete Forum and Search --> : changing DAO field types and field order from VB?


crispin
Oct 30th, 2000, 04:32 AM
DAO 3.6 and Access 2000:

I want to change the data type of a field from number to text, to perform some other operations on it. I have a feeling the Type property is read only from VB - although you can do this from the Access GUI.

Second I have performed lots of other field operations on my data and the field order (in the table definition screen) is now different to when I started. Once again in the access GUI you can drag the fields and reposition them as you wish - can you do it from VB? i.e. is there a way to order the fields collection.

Thanks in advance

BruceG
Oct 30th, 2000, 06:46 AM
As far as I know, you cannot change the Type property of a field through DAO code. The way around this is to create a new field, copy the data from the old field to the new field, the drop the old field. You can change the field order via the OrdinalPosition property of a field.