[AccessD] Change Field Size

Gustav Brock Gustav at cactus.dk
Sun Dec 4 12:21:08 CST 2005


Hi Fred

Yes, and if relations exist:

(0) Gets and removes any relations involving an index of the field.
...
(8) Re-applies the relations

Also, you may need to maintain the OrdinalPosition of the field.

/gustav

>>> fahooper at trapo.com 04-12-2005 19:09 >>>
The only way I've seen that works is that shown by Allen Beechick at
http://aislebyaisle.com/access/vba_backend_code.htm. 

His code:
(1) Gets and removes any indexes involving the field.
(2) Renames the field
(3) Creates a new field in the same place with the old name and new width
    (or, perhaps a new field type, etc.)
(4) Copies the contents of the old field to the new field
(5) Drops the old field
(6) Re-applies the indexes

Hope this helps,
Fred Hooper





More information about the AccessD mailing list