I am using access 2003. I am reading properties from a table which is not a problem as long as a field is populated. The problem I am running into is if the field is not populated an error is caused and my routine ends. I have tried to use isnull, <> or "" with no luck. If I hover over dBase.TableDefs(lTbl).Fields(lFld).Properties("InputMask") I get property not found. Any help would be appreciated.
Code:
With goXL.ActiveSheet
'Data Type property
.Range("C" & lRow) = "Text"
'Size property
.Range("D" & lRow) = dBase.TableDefs(lTbl).Fields(lFld).Size
'Format property
.Range("E" & lRow) = dBase.TableDefs(lTbl).Fields(lFld).Properties("Format")
' Input Mask property
If dBase.TableDefs(lTbl).Fields(lFld).Properties("InputMask") = "" Then
.Range("F" & lRow) = dBase.TableDefs(lTbl).Fields(lFld).Properties("InputMask")
End If
'Caption property
.Range("G" & lRow) = dBase.TableDefs(lTbl).Fields(lFld).Properties("Caption")
'Default Value property
.Range("H" & lRow) = dBase.TableDefs(lTbl).Fields(lFld).DefaultValue
'Required property
If .Range("I" & lRow) = dBase.TableDefs(lTbl).Fields(lFld).Required = False Then
.Range("I" & lRow) = "Yes"
Else
.Range("I" & lRow) = "No"
End If
'Allow Zero Length property
If .Range("J" & lRow) = dBase.TableDefs(lTbl).Fields(lFld).AllowZeroLength = False Then
.Range("J" & lRow) = "Yes"
Else
.Range("J" & lRow) = "No"
End If