adam.greer
Registered User.
- Local time
- Today, 07:53
- Joined
- Apr 27, 2006
- Messages
- 43
Hi all
I'm trying to change the 'Format' of a number field in a table. I've already converted the field from Text to Number with the following code
This works great, however I also want to change the format to 'Percent'. I'm not sure if it's possible with this function. I've also tried the following code
That returns with the error 'Property Not Found'. I have included DAO 3.6 in my references.
Any help would be much appreciated.
I'm trying to change the 'Format' of a number field in a table. I've already converted the field from Text to Number with the following code
Code:
db.Execute "ALTER TABLE tmpClientSatisfactionExport ALTER COLUMN Satisfied NUMBER;"
This works great, however I also want to change the format to 'Percent'. I'm not sure if it's possible with this function. I've also tried the following code
Code:
Dim DB As Database
Dim TD As DAO.TableDef
Dim fld As DAO.Field
Dim prop As DAO.Property
Dim strFormat As String
Dim strFormat2 As String
Set DB = CurrentDb
Set TD = DB.TableDefs("tmpClientSatisfactionExport")
Set fld = TD.Fields("Satisfied")
fld.Properties("Format") = "Percent"
That returns with the error 'Property Not Found'. I have included DAO 3.6 in my references.
Any help would be much appreciated.