Hi to all,
this is problem, I create a VB.NET programs, where there are a AccessDB, from table A of this DB I create dynamically a textbox and for each textbox I create two combobox1, the fisrt one it's populated by table B, and until here all are ok, I obtain a form with a line for each record in table A, but now I want to populate the second combobox2 doing a sql query on table C using the value in textbox and combobox1, and here I don't know how to obtain value from dynamic controls.
The problem is that also then I want export each value of line in db or csv.
Can anyone help me please, or paste any example.
Thank a lot.
Your controls are part of the Controls collection of the form, but if you're creating them dynamiclaly, you're better off putting them in a collection so you have kept a reference to them and can refer to them from there. You can set their id in code, and look for it, or use a dictionary to map a value ( probably a string ) to each control you want to look for.
I resolve using dictionary with integer as ID reference.
Thank a lot for suggestion.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)