Table datasheets aren't appropriate for viewing or printing data, and you can
set the format of a textbox in a Form or Report to default to Standard (if
indeed it doesn't do so already).
However if you want...
Dim tdf As DAO.Tabledef
Dim fld As DAO.Field
Dim db As DAO.Database
Set db = CurrentDb
For Each tdf In db.Tabledefs
' exclude system tables
If Left(tdf.Name, 4) <> "MSYS" Then
For Each fld In tdf.Fields
Select Case fld.Type
Case dbInteger, dbLong, dbSingle, dbDouble, dbDecimal
fld.Format = "Standard"
Case Else
' do nothing
End Select
End If
Next tdf
Untested air code, back up your database first of course!!!
Taken directly from a control's Format property drop-down:
3,456.78
From Format Help
Standard Use the thousand separator; follow the settings specified
in Regional Settings in Windows Control Panel for negative amounts,
decimal symbols, and decimal places.
Tony (why is Access taking so long?)
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.