Results 1 to 6 of 6

Thread: [RESOLVED] Referencing control array in frame

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2008
    Posts
    8

    Resolved [RESOLVED] Referencing control array in frame

    Hello,

    This seems such a simple problem, so I apologize if this has been answered; I have checked many threads but have not found the precise solution.

    If I have a container, frame1, and a control array of text boxes txt(0), txt(1), txt(2)...how do I reference a particular control in code?

    I have tried frame1.txt(0).top = 100, but that yields the error message, "Method or data member not found."

    Thanks for the help...Keith.

  2. #2
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Referencing control array in frame

    Just refer to them as txt(0), they don't sit under the frame object

  3. #3
    Junior Member
    Join Date
    Mar 2007
    Posts
    16

    Re: Referencing control array in frame

    just put form1.txt(0).top = 100

    if your form name is "Form1" and the text box name is "txt".otherwise change it according to the name of the form as well as controlls that you have taken instead of your code frame1.txt(0).top = 100

    Hope it will help you.best of luck

    regards
    somdeep kanu

  4. #4

    Thread Starter
    New Member
    Join Date
    Jan 2008
    Posts
    8

    Re: Referencing control array in frame

    Thanks Bushmobile and Somdeep,

    The issue is I have 4 frames on the form, and each one has an array of 10 text boxes. I want to number each of the text boxes in the frames from 0-9. So, I'm trying to access, for example, frame2.txt(3).top.

  5. #5
    Junior Member
    Join Date
    Mar 2007
    Posts
    16

    Re: [RESOLVED] Referencing control array in frame

    take the different name of text box for each frames.

    in first frame keep the name of the textbox txtone and take control array from 0-9
    in second frame keep the name of the textbox txttwo and take control array from 0-9
    and soo oon

    hope this will help u

  6. #6
    Addicted Member
    Join Date
    Mar 2005
    Posts
    174

    Re: [RESOLVED] Referencing control array in frame

    What happens if frames too are in array? and the objective remains same KeithLockhart67

Tags for this Thread

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