Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to set field fformat using dao.field?

Status
Not open for further replies.

sgupta76

Programmer
Nov 26, 2003
34
US
I am creating a table using code and adding a field called "Percentage" like below
Set fld1 = tblCreate.CreateField("Percentage", dbInteger)

I need to set the format for this field to "Percent". I can't seem to find a format property. How do I achieve this?

Thanks for your help
 
I'm going to assume, because I don't see it happening within the scope of the code, that you would declare the field dbDouble and then Format it in a Form or Report. If you declare it dbInteger, then you can only enter whole number and 1 is going to format as 100% which is probably not what you had in mind(27 becomes 2700%).
That's my take on it at this point.

Paul
 
Thanks Paul.
I guess setting the format using code is not an available property. I am now creating the field as double.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top