I am currently working on a Windows Forms application where I open a second form to enter and save some values to the database. Upon saving the values, I would like to reset the datasource of the grid control on the first form so that it displays the new data that has been entered on the second form. In VB6, it was simply [FormName].[ControlName].[whatever Property you wanted to access]. This does not work in VB.NET. If I create a new instance of the first form from the second form, it does not refresh the currently open form. I tried to create a shared method on the first form that accesses it's own controls, but I get the message "Cannot refer to an instance member of a clas from within a shared method or shared member initializer without an explicit instance of the class". I am not quite sure how I should create an explicit instance of the class to access the values within the controls - perhaps I am thinking too deeply and overcomplicating things.
If anyone can help me out with determining the best way to access/update the values of one open form from within another open form, it would be greatly appreciated!
If anyone can help me out with determining the best way to access/update the values of one open form from within another open form, it would be greatly appreciated!