G
Guest
Hi,
I have created an SQL string which is fed into a query. I then want to
change the "Format" and "DecimalPlaces" properties of the field "Downloads".
However for some reason this field doesn't contain these properties. If I
run the follwing code it shows that I only have these field properties:
### Code to check field properties ###
For count = 0 To 30
Debug.Print count,
CurrentDb.QueryDefs("Custom_Sales_Query").Fields("Downloads").Properties(count).Name
Next count
### Result ###
1 Attributes
2 CollatingOrder
3 Type
4 Name
5 OrdinalPosition
6 Size
7 SourceField
8 SourceTable
9 ValidateOnSet
10 DataUpdatable
11 ForeignName
12 DefaultValue
13 ValidationRule
14 ValidationText
15 Required
16 AllowZeroLength
17 FieldSize
18 OriginalValue
19 VisibleValue
20 GUID
As it doesn't offer me "Format" or "DecimalPlaces" I assume it's not being
recognised as a numerical field. I've tried wrapping cdbl() around the field
so it knows it's a numerical field but this still doesn't work.
I can do it in the design view of the query but I need to do it in code
(which I obviously can't as it doesn't recognise these field properties).
Can anyone help?
Thanks very much in advanced!
I have created an SQL string which is fed into a query. I then want to
change the "Format" and "DecimalPlaces" properties of the field "Downloads".
However for some reason this field doesn't contain these properties. If I
run the follwing code it shows that I only have these field properties:
### Code to check field properties ###
For count = 0 To 30
Debug.Print count,
CurrentDb.QueryDefs("Custom_Sales_Query").Fields("Downloads").Properties(count).Name
Next count
### Result ###
1 Attributes
2 CollatingOrder
3 Type
4 Name
5 OrdinalPosition
6 Size
7 SourceField
8 SourceTable
9 ValidateOnSet
10 DataUpdatable
11 ForeignName
12 DefaultValue
13 ValidationRule
14 ValidationText
15 Required
16 AllowZeroLength
17 FieldSize
18 OriginalValue
19 VisibleValue
20 GUID
As it doesn't offer me "Format" or "DecimalPlaces" I assume it's not being
recognised as a numerical field. I've tried wrapping cdbl() around the field
so it knows it's a numerical field but this still doesn't work.
I can do it in the design view of the query but I need to do it in code
(which I obviously can't as it doesn't recognise these field properties).
Can anyone help?
Thanks very much in advanced!