packman
Jul 9th, 2002, 08:35 AM
Can anyone tell me how to reference a control from another form?
For example, form1 has a populated datagrid on it. While form1 is still visible, the operator can click a button and form2 will appear on the top half of form1 (datagrid still visible for form1). Form2 is used to insert data into a database table. A routine is called that populates the datagrid. However, since this routine is in form2 and the datagrid is on form1, the IDE gives an error. In VB6 all I had to do in order to reference the datagrid on form1 from form2 is: FORM1.DATAGRID. How do I accomplish this in VB.Net. Thanks
For example, form1 has a populated datagrid on it. While form1 is still visible, the operator can click a button and form2 will appear on the top half of form1 (datagrid still visible for form1). Form2 is used to insert data into a database table. A routine is called that populates the datagrid. However, since this routine is in form2 and the datagrid is on form1, the IDE gives an error. In VB6 all I had to do in order to reference the datagrid on form1 from form2 is: FORM1.DATAGRID. How do I accomplish this in VB.Net. Thanks