Walter Cuypers
Programmer
When you have a field type DOUBLE in your database that is bigger than 99.999.999.999 the Microsoft Access 2013 application will display the number (by default) in scientific format.
I have written a routine to turn off the scientific format an go back to a normal integer Number format without decimals. Other TEK-TIPS have helped me to get on track fast... thanks!
Procedure Call example :
Call Remove_Scientific_Format ("C:\Users\id980227\Documents\ProjectStatus.accdb", "MonthlyReport")
Public Sub Remove_Scientific_Format( AccessDatabase As String, TableName As String )
Dim Field As Field
Dim db As DataBase
Set db = OpenDatabase(AccessDatabase, True, False)
For Each Field In db.TableDefs(TableName).Fields
Select Case Field.name
Case "master_key", "circuit_id": Field.Properties.Append Field.CreateProperty( "format", dbText, "Fixed" )
Field.Properties.Append Field.CreateProperty( "decimalplaces", dbByte, 0 )
End Select
Next Field
db.TableDefs.Refresh
db.Close : set db = Nothing
End Sub
I have written a routine to turn off the scientific format an go back to a normal integer Number format without decimals. Other TEK-TIPS have helped me to get on track fast... thanks!
Procedure Call example :
Call Remove_Scientific_Format ("C:\Users\id980227\Documents\ProjectStatus.accdb", "MonthlyReport")
Public Sub Remove_Scientific_Format( AccessDatabase As String, TableName As String )
Dim Field As Field
Dim db As DataBase
Set db = OpenDatabase(AccessDatabase, True, False)
For Each Field In db.TableDefs(TableName).Fields
Select Case Field.name
Case "master_key", "circuit_id": Field.Properties.Append Field.CreateProperty( "format", dbText, "Fixed" )
Field.Properties.Append Field.CreateProperty( "decimalplaces", dbByte, 0 )
End Select
Next Field
db.TableDefs.Refresh
db.Close : set db = Nothing
End Sub