Changing Field Attributes

H

Holger Lochner

Hi there,

I'd like to change the field attributes from memo to hyperlink, bu
don't know how.
Here's what I tried so far:
Set DB = CurrentDb
Set Tbl = DB.TableDefs("myTableName")
Set Fld = Tbl!myFieldName

Fld.Attributes = dbVariableField + dbHyperlinkField

But this is not working. PLEASE help me
 
G

George Nicholson

AFAIK, you can't change field data types.

When you "change" a field type in the Access UI, what really happens is
something like: 1) Field is renamed OldField 2) a new Field is created with
the new data type, 3) Old Field data is copied to NewField (as much as
possible) 4) Old Field is deleted. (Note: OldField continues to occupy space
and count against the 255 field limit until you compact)

You would need to something similar to "change" a data type via code.
 
Top