PDA

View Full Version : [SOLVED:] Populating text boxes



Chunk
03-07-2019, 08:15 AM
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

Rob342
03-07-2019, 08:56 AM
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

大灰狼1976
03-08-2019, 02:11 AM
Hi Chunk!
Only dealing with key parts(filter), and i used listbox instead of textbox.
Please refer to the Attachment.

Chunk
05-29-2019, 07:20 AM
大灰狼1976 (http://www.vbaexpress.com/forum/member.php?70849-大灰狼1976),

This is much nicer than what I had envisioned.

I am new to arrays and trying to dissect the code to find where I can sort the lists that are populating the project and job order combo boxes.

Chunk
(http://www.vbaexpress.com/forum/member.php?70849-大灰狼1976)

Chunk
06-04-2019, 06:59 AM
Closing thread due to change in toppic