Can anyone PLEASE tell me why I the code below produces a type mismatch error? It breaks on highlighted...
Code:
Public Sub ReadFormProps(frmOpenForm As Form, HistoryID As Integer)
Dim ctrl As Control 'to loop through controls
Dim prpty As Property 'to loop through properties of controls
With frmOpenForm
strName = .name
intControlCount = .Controls.Count
strCaption = .Caption
For Each ctrl In frmOpenForm.Controls
strCtrlName = ctrl.name
intControlType = ctrl.ControlType
[COLOR="Red"] For Each prpty In ctrl.Properties[/COLOR]
strPropertyName = prpty.name
varPropertyvalue = .Properties(strPropertyName).Value
Next 'property of control
Next 'control on form
End With 'open form