Changing Field Data Type (1 Viewer)

KDg

Registered User.
Local time
Today, 19:35
Joined
Oct 28, 1999
Messages
181
does anyone know how to change the data type of a pre-existing field in a table from text to long in VBA?
 

Travis

Registered User.
Local time
Today, 11:35
Joined
Dec 17, 1999
Messages
1,332
You know that type of question plaqued me for months. This is what I found out. There are properties that you can change in code (e.g.; AllowZeroLength) but the type and size are not doable. You can however recreate the field in the table run an update query to append the old field to the new and then remove the old field through VBA. This method only becomes a problem if you use the fields ordinal position somewhere in you code. Another method is to recreate the entire table in VBA and Append the data that way and then delete the old table.
 

KDg

Registered User.
Local time
Today, 19:35
Joined
Oct 28, 1999
Messages
181
Thanks Travis, I've taken your advice and went for the appending fields approach, works like a dream. Annoying you can't change datatypes though, Cheers, Drew
 

Users who are viewing this thread

Top Bottom