Results 1 to 2 of 2

Thread: How do you make a string executable?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2001
    Posts
    122

    Question How do you make a string executable?

    I have an application in which different controls are available to different users. I do this using the visibility property. In my database, one field lists all of the controls on the user interface by name. Another field indicates whether this control should be visible.

    The following will obviously not work:

    'Read the control name into a string
    strControlName = rs!.fields(0)

    'Set the control's visibility
    strControlName.visible = true

    Is there a way that I can read the control name into a string and then create an executable statement like above? This way, I can put it into a loop instead of writing a ton of "IF" statements.

  2. #2
    Fanatic Member
    Join Date
    Feb 2002
    Location
    SE England
    Posts
    732
    you can use call by name, or a loop through the controls collection..
    Leather Face is comin...


    MCSD

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