cannot find 'value' in the properties colletcion...

  • Thread starter Thread starter rocco
  • Start date Start date
R

rocco

Hello,
I have a form with many controls of different type.
I'm building a procedure to clean the value of any controls.
This is what I wrote:
---------
Dim ctl As Control
Dim i As Integer
For Each ctl In Me.Controls

For i = 0 To Me.Controls(ctl.name).Properties.Count - 1
If Me.Controls(ctl.name).Properties(i).Name = "Value" Then
ctl.Value = Null
Exit For
End If
Next
Next
-----------------
It runs...but doesn't do anything.
I checked it against a combobox and it has come out it never finds the value
property iterating the collection.
How could this happen?

Thanks,
Rocco
 
thank you,
that is what I have done.
i was just wondering why I cannot find 'value' in the properties collection.
Just trying to learn something...
 
Thanks you very much for this hint !!


Marshall Barton said:
Your guess is as good as mine. I suspect it's because the
property has no meaning until the form is loaded so it was
implemented as an internal property. (I have it from a
"reliable source" that there are a lot of internal
properties that we can not use at any time.)
 
Back
Top