clear text & radio

Posted on 2006-03-30
Last Modified: 2010-04-23
How would I accomplish this?

for each ctl in controls
  if typeof ctl is textbox then ctl.text=""
  if typeof ctl is radiobutton then ctl.checked=false

But I get "checked is not a member of forms.control" : \
Question by:sirbounty
    LVL 69

    Accepted Solution

    Hi sirbounty,

    You have to cast your CTL object variable
      if typeof ctl is radiobutton then ctype(ctl, radiobutton).checked=false

    LVL 67

    Author Comment

    Thanx, as always! :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Article by: jpaulino
    XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String ( Literal, only instead of starting and ending with w…
    Introduction When many people think of the WebBrowser ( control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now