Welcome to SPN

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

Sign Up Now!

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.
    >
     

Share This Page