Table field display format

dcx693

Registered User.
Local time
Today, 07:56
Joined
Apr 30, 2003
Messages
3,265
I have a user with an Access database. He's got 50+ tables, and roughly 10 fields in each table. The fields are the Double data type. He'd like to have them display as "Standard" with 0 decimal places when the table is opened directly (purely a cosmetic preference on his part).

Anybody know the easiest way to achieve this? Obviously, he could go to each table, then to each field and change the Format and Decimal place fields, but that would be rather time-consuming.

I tried to devise a VBA method to do it, but I couldn't figure out how to manipulate the Format and Decimal place properties for fields in a table.

Help? Anyone?
 
Pat,
Thanks for the reply. I actually tried something very similar to what you suggested.

The problem is that the "AllowZeroLengthString" appears to be one of the field properties you can access (and set) using DAO, the "Format" property appears to be inaccessible.

I tried using a loop to enumerate all the properties of the fields and this is the list I got back:

ForeignName
DefaultValue
ValidationRule
ValidationText
Required
AllowZeroLength
FieldSize
OriginalValue
VisibleValue
ColumnWidth
ColumnOrder
ColumnHidden
DecimalPlaces
DisplayControl


Alas, it appears "Format" is not on the list.
 
Oh well, thanks anyway for checking it out. It's not really worth more effort since it was just a cosmetic thing the guy wanted.
 
Same problem

I wanted to export data to excel and I wanted to know how to format each field. Until now, I'm using a trick but this is not efficient and clean: I open the form Access created and go check which format did he put into the textbox of the field. So if someone know how to read which format is used... Thx
 
I rexplain

Here is the situation,
I'm a lazy programmer :) and I don't want to specify for each field if the format is Percent or not. Now I don't export with a query directly but with code.
The question is, how does Access know what format is specified in the field?
Because the form wizard knows it. And I want to know it too!!!
Another Microsoft's mystery.....
 

Users who are viewing this thread

Back
Top Bottom