If you've got references set to both ADO and DAO, try being explicit in your
declaration"
Dim fld As DAO.Field
Dim prop As DAO.Property
Field and Property are objects in both models, and since you're using DAO in
your code, it's critical that they be instantiated as the correct type.
--
Doug Steele, Microsoft Access MVP
(no private e-mails, please)
rwboyden via AccessMonster.com said:
Douglas said:
The Format property is a String, not a Currency.
Try:
Set prop = fld.CreateProperty("Format", dbText, "Fixed")
I need to create a field using VBA which will display with 2 decimal
places.
[quoted text clipped - 24 lines]
' Append the field to the table
tdf.Fields.Append fld
Very logical ... tried this and got an "invalid operation" error on the
"Append.fld" line.
The Format property is "read only" ... is there a way around this or is
there a set of
VBA-assignable specs which would give me the the 2 decimal place format?