Results 1 to 4 of 4

Thread: Clearing all textboxs on a form

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Posts
    81

    Post

    i have about 60 text box's on a form and i dont want to clear each one manually on refresh

    text1.text = "" kind of thing
    I know there is a way to do something like for every control on form1 text = "" or something ...

    Thanks
    Brooke


  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    Try:
    Code:
    For Each Control In Me
       If TypeOf Control Is Textbox Then Control.Text = ""
    Next

    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Posts
    81

    Post

    Worked great thanks.

  4. #4
    Member
    Join Date
    Aug 2013
    Posts
    47

    Re: Clearing all textboxs on a form

    Thank you for this code... Though i have code, i think this is good to my old one...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width