I am running access 2003. When the datatype is set to number and the field size is set to Decimal I can't read the Precision or scale properties. I used the regular way within my function but I get no errors or results. Since I don't know what Unicode compression, IME Mode or IME Sentence Mode is I am not interested in getting that information. Which means If I can figure out these last two properties this project will be over. Any help would be appreciated.
Code:
Function XLFormatPrecision(ByRef D As Field, ByRef Col As String, ByRef lTbl As Integer, ByRef lRow As Integer, ByRef lFld As Integer) As String
Dim dBase As DAO.Database
Set dBase = CurrentDb
On Error Resume Next
If dBase.TableDefs(lTbl).Fields(lFld).Properties("Precision") = "" Then
goXL.ActiveSheet.Range(Col & lRow) = "not set"
Else
goXL.ActiveSheet.Range(Col & lRow) = dBase.TableDefs(lTbl).Fields(lFld).Properties("Precision")
End If
Err.Clear
End Function
Function XLFormatScale(ByRef D As Field, ByRef Col As String, ByRef lTbl As Integer, ByRef lRow As Integer, ByRef lFld As Integer) As String
Dim dBase As DAO.Database
Set dBase = CurrentDb
On Error Resume Next
If dBase.TableDefs(lTbl).Fields(lFld).Properties("Scale") = "" Then
goXL.ActiveSheet.Range(Col & lRow) = "not set"
Else
goXL.ActiveSheet.Range(Col & lRow) = dBase.TableDefs(lTbl).Fields(lFld).Properties("Scale")
End If
Err.Clear
End Function