AccessAllstars
New member
- Local time
- Today, 12:32
- Joined
- Apr 26, 2023
- Messages
- 19
As part of my development process I create a table which holds all table names, field names, field type etc... I think of it as a data dictionary. I review this to confirm I have been consistent in naming conventions, field size, etc... I have everything working just fine with one exception, I cant seem to get the number of decimal places. This is all DAO
...
Dim daTdf As DAO.TableDef
Dim fld As DAO.Field
...
With db
tblCount = .TableDefs.Count
For Each daTdf In .TableDefs
'''Debug.Print daTdf.Name
Set td = daTdf
NameHold = td.Name
Select Case Left(NameHold, 4)
Case "DBA_", "MSys", "qwet", "tblf"
GoTo NextTableDef
End Select
On Error Resume Next
For Each fld In td.Fields
FieldDescription = fld.Name
TypeHold = FieldTypeName_DAO(fld)
SizeHold = fld.Size
DecimalPlacesHold = fld.DecimalPlaces ???????????
If fld.Required = False Then
FieldRequired = "FALSE"
Else
FieldRequired = "TRUE"
End If
...
Everything works great except for the decimal places. How can I get the number of decimal places?
Thank You!
...
Dim daTdf As DAO.TableDef
Dim fld As DAO.Field
...
With db
tblCount = .TableDefs.Count
For Each daTdf In .TableDefs
'''Debug.Print daTdf.Name
Set td = daTdf
NameHold = td.Name
Select Case Left(NameHold, 4)
Case "DBA_", "MSys", "qwet", "tblf"
GoTo NextTableDef
End Select
On Error Resume Next
For Each fld In td.Fields
FieldDescription = fld.Name
TypeHold = FieldTypeName_DAO(fld)
SizeHold = fld.Size
DecimalPlacesHold = fld.DecimalPlaces ???????????
If fld.Required = False Then
FieldRequired = "FALSE"
Else
FieldRequired = "TRUE"
End If
...
Everything works great except for the decimal places. How can I get the number of decimal places?
Thank You!