accessman2
Registered User.
- Local time
- Today, 05:37
- Joined
- Sep 15, 2005
- Messages
- 335
Hi
I want to change the property setting of DecimalPlaces
Firstly,
I made the crosstab query,
then, I used SQL to create the new table as following code
CurrentDb.Execute "SELECT [qry2_crosstab].* INTO [New Table] FROM [qry2_Crosstab];"
Afterwards, I used the following codes to change the property setting, the Format is OK, but the decimalplaces is NOT working, it shows "Property Not Found"
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim qd As TableDef
Dim str As String
Set db = CurrentDb
Set qd = db.TableDefs("New Table")
qd.fields("Total").Properties("Format") = "Percent"
qd.fields("Total").Properties("DecimalPlaces") = 5
What's wrong with it?
Please let me know, thanks.
I want to change the property setting of DecimalPlaces
Firstly,
I made the crosstab query,
then, I used SQL to create the new table as following code
CurrentDb.Execute "SELECT [qry2_crosstab].* INTO [New Table] FROM [qry2_Crosstab];"
Afterwards, I used the following codes to change the property setting, the Format is OK, but the decimalplaces is NOT working, it shows "Property Not Found"
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim qd As TableDef
Dim str As String
Set db = CurrentDb
Set qd = db.TableDefs("New Table")
qd.fields("Total").Properties("Format") = "Percent"
qd.fields("Total").Properties("DecimalPlaces") = 5
What's wrong with it?
Please let me know, thanks.