Anyway, here's a little sub to get the Zero Length thing from a module outside the form class:
Code:
Sub getZL()
Dim frm As Form
Set frm = Forms("SomeForm").Form
Dim item As Variant
For Each item In frm.Recordset.Fields
Debug.Print "at root", item.Name, item.AllowZeroLength
Debug.Print "in properties", item.Name, item.Properties.item("AllowZeroLength").Value
Next item
End Sub
Similarly, if you want to get that from the form itself, then:
Code:
Sub getZL()
Dim item As Variant
For Each item In Me.Recordset.Fields
Debug.Print "at root", item.Name, item.AllowZeroLength
Debug.Print "in properties", item.Name, item.Properties.item("AllowZeroLength").Value
Next item
End Sub
And I don't really know what's going on here, but if you also want to get the control types in the form:
Code:
Sub getAllControlTypes()
Dim ctl As Control
For Each ctl In Me.Controls
Debug.Print ctl.Name, ctl.Properties.item("ControlType").Value
Next
End Sub
Or just the type of the control with focus:
Code:
Sub getCurrentControlType()
Debug.Print Me.ActiveControl.Properties.item("ControlType").Value
End Sub
It's all in the form variable.