View Full Version : CreateProperty for a field


lozzablake
07-06-2005, 08:48 AM
I create a query on the fly from user input. The query works fine and displays. but I would like to format the numeric fields so that they are 'standard' with zero decimal places.

I think I need to use the createproperty method and then append the property to the properties collection of the field. However, I ca't seem to find anything that tells me what the appropriate arguments are for createproperty and how I reference the properties for each field.

Thanks for any pointers

ghudson
07-06-2005, 11:05 AM
Just use the Format() function for the field in question with your query [SQL].

Field_1: Format([Field1],"Standard")

lozzablake
07-07-2005, 01:15 AM
Thanks. That works, but changes the values to text (and loses the decimal part of the number). I really want a solution that keeps the data type as numeric, but just chagens the way the numbers are displayed.

ghudson
07-07-2005, 06:10 AM
Try...Field_1: Format([Field1],"#,###.##")