Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1. Guest ji, please consider donating today!   Become a Supporter    ::   Make a Contribution   
    Monthly (Recurring) Target: $300 :: Achieved: $95

identifying controls

Discussion in 'Information Technology' started by William, Nov 17, 2005.

  1. William

    William
    Expand Collapse
    Guest

    I am trying to cycle through the controls collection in a form and identify a
    control by the name property. First I narrow the filed by identifying the
    textboxes which is the type of control I am trying to identify. The purpose
    of this is to find empty controls. When I use a Select case structure it
    fails to stop at the appropriate case even though if I debug.print
    control.name it gives me the appropriate name of the control.

    Select Case Control.name
    Case txtName 'actual control name
    end select

    Does not execute.
    What am I missing?
    Thanks.
     
  2. Loading...


  3. Brendan Reynolds

    Brendan Reynolds
    Expand Collapse
    Guest

    String literals need to be enclosed in quotes ...

    Case "txtName"

    --
    Brendan Reynolds


    "William" <William@discussions.microsoft.com> wrote in message
    news:C0450D49-8CDA-4DFA-9B8C-0D095B90EBEE@microsoft.com...
    >I am trying to cycle through the controls collection in a form and identify
    >a
    > control by the name property. First I narrow the filed by identifying the
    > textboxes which is the type of control I am trying to identify. The
    > purpose
    > of this is to find empty controls. When I use a Select case structure it
    > fails to stop at the appropriate case even though if I debug.print
    > control.name it gives me the appropriate name of the control.
    >
    > Select Case Control.name
    > Case txtName 'actual control name
    > end select
    >
    > Does not execute.
    > What am I missing?
    > Thanks.
    >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page