Consulting

Results 1 to 5 of 5

Thread: Populating text boxes

  1. #1
    VBAX Regular
    Joined
    Feb 2015
    Posts
    80
    Location

    Populating text boxes

    I need some help guys,

    I have a user form that a user will use to locate materialsfor a job with a specific job order.
    They select the project combo box that filters (cascading/dependent)the job order combo box.
    What I want to happen is this:
    When a selection is made in the project combo, the Resultsframe will populate with all of the projects job orders
    If a selection is made in the job orders combo box, theresults frame will only display the selected project and selected job orderonly.
    Note: It is possible for the project to have differentversions of the same job order
    Note: It is possible for different projects to have the samejob order

    I have the combo boxes working. Because the number ofprojects and job orders are always changing, I am using a named range that getsbuilt on opening the userform and when selecting a project.
    Here’s what I need help with:

    Right now I am only trying to populate the first set ofresults (first row, if you will)
    Eventually I would like the first ten to populate. I knowthere’s a way to loop through them using a counter/variable, but haven’t foundthe solution yet.
    The text boxes are sequentially named (ie tb_rslt_p1, tb_rslt_j1….etc)
    When the first set of text boxes populates, it is NOT usingthe first job order. I would like the job orders to appear in sequential(lowest to highest) order.
    Attached is a copy of the file I am working on.

    Any assistance you can give is greatly appreciated.

    Chunk


    Attached Files Attached Files

  2. #2
    VBAX Mentor
    Joined
    Apr 2009
    Location
    Kingsbury
    Posts
    423
    Location
    Chunk
    What happens when you have 30 job orders the form is only showing 10 ? how are you going to cope with them ?
    Much better to use dynamic named ranges that Vlookup
    Why don't you use a list box and you can then scroll through hundred's if you want, then select or double click the one you want to show the details
    Database need some work !
    Rob

  3. #3
    VBAX Mentor 大灰狼1976's Avatar
    Joined
    Dec 2018
    Location
    SuZhou China
    Posts
    479
    Location
    Hi Chunk!
    Only dealing with key parts(filter), and i used listbox instead of textbox.
    Please refer to the Attachment.
    Attached Files Attached Files

  4. #4

  5. #5
    VBAX Regular
    Joined
    Feb 2015
    Posts
    80
    Location
    Closing thread due to change in toppic

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •