Unanswered: Set a fields format property using VBA
I need to update a fields property in the table, lets call the table products and the field prodnum. The prodnum field need to be a long integer formatted 00000 (five zeros).
CurrentDb.Execute "ALTER TABLE products Add COLUMN prodnum long"
Works fine creates the field I need
I have event tryied this with no luck.
Set DB = CurrentDb()
Set Newtbl = DB.CreateTableDef(products)
Set newfld = Newtbl.CreateField("prodnum", dbLong)
Set fldprop = newfld.CreateProperty("Format", dbLong, 00000)
I cant seem to get the formatting to work. Have at it see what you can come up with. Go ahead and change what you need as long as it adds the field to the table and sets it as a Long Integer formatted to 00000. Thanks