Quantcast
Viewing all articles
Browse latest Browse all 22

Edited Issue: Lookups fields do not always have RowSource [1174]

Lookup fields do not always have a RowSource.

In mod_Analyzer_110_LookupFields, this statement needs to change to keep the Analyzer from crashing.

!theSQL = fldAnalyze.Properties("RowSource")

maybe try...
```
Function CanGet_ObjectProperty( _
pObj As Object _
, psPropName As String _
, pValueRETURN As Variant _
, Optional ByVal pDatTypN As Integer = 0 _
, Optional ByVal pMaxLength As Integer = 0 _
) As Boolean
'PARAMETERS
' pObj = object to get property for
' psPropName = name of property
' pValueRETURN = RETURN Value
' pDatTypN (optional) = data type to convert value to (code for all data types not written)
' pMaxLength (optional) = maximum length (for text only)

```

this function is poorly named ... if the property is available, it will return the value in the pValueRETURN parameter

here is an example of its use:

```
If CanGet_ObjectProperty(Fld, "UnicodeCompression", varValue, 1) Then '1 is data type for true/false
If Not CInt(varValue) = -1 Then 'no unicode compression
iMult = 2
sUni = "*"
bCheckUnicode = True
End If
End If
```

but ... perhaps __something simple might work too__:

```
If IsPropertyDefined("RowSource", fldAnalyze) Then !theSQL = fldAnalyze.Properties("RowSource")
```

Viewing all articles
Browse latest Browse all 22

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>