Elli:
Presumably this is an unbound form. Try this:
Dim ctrl As Control
' ignore error if control does not have Value property
OnError Resume Next
' loop through form's Controls collection and set each to Null
For Each ctrl In Me.Controls
ctrl = Null
Next ctrl
Ken Sheridan
Stafford, England
> How do I get all the textboxes cleared when I leave the form or click the
> button?
[quoted text clipped - 3 lines]
>
> -elli-
elli - 28 Feb 2006 20:27 GMT
Hi Ken and thanks for a quick reply...
It is an anbound form and your piece of code seems to work allright.
Thank U!
Take care -elli-
"Ken Sheridan" <KenSheridan@discussions.microsoft.com> kirjoitti
viestissä:96CDABE4-30B9-4107-8DAA-A6CD0CDD406F@microsoft.com...
> Elli:
>
[quoted text clipped - 20 lines]
>>
>> -elli-