hello there.
I have a problem with a datagrid on a VB.net 2003 form.
the datagrid displays data from an mdb file via an odbc connection.
on the form i have a toolbar, some buttons and the datagrid.
on of hte buttons is an "Add New" option, that opens a new form to update data in the database.
all of this works as anticipated. however, this is where i run into difficulty.
i am simply unable to get the datagrid to refresh and show the new contents of the database. its probably something really straightforward that i am missing, but i just cannot seem to get it to happen.
code that calls the new form - this is in the toolbar1_buttonclick event.
<code>
Select Case ToolBar1.Buttons.IndexOf(e.Button)
Case 0
Dim addNew As Form = New AddNew
addNew.Show()
Case 1 : MsgBox("Delete")
End Select
</code>
this whole function is executed before the form is displayed on the screen, so any update commands i add here are running before the new items have been added.
i am unable to find an event that fires on the original form when the addnew form has completed.
i have tried to create a new instance of the original form in addnew and running a sub that would do the update, but it is not referencing the correct (original) version of the form.
Please could anyone help (that is, if you can understand my babblings
)
thanks in advance
I have a problem with a datagrid on a VB.net 2003 form.
the datagrid displays data from an mdb file via an odbc connection.
on the form i have a toolbar, some buttons and the datagrid.
on of hte buttons is an "Add New" option, that opens a new form to update data in the database.
all of this works as anticipated. however, this is where i run into difficulty.
i am simply unable to get the datagrid to refresh and show the new contents of the database. its probably something really straightforward that i am missing, but i just cannot seem to get it to happen.
code that calls the new form - this is in the toolbar1_buttonclick event.
<code>
Select Case ToolBar1.Buttons.IndexOf(e.Button)
Case 0
Dim addNew As Form = New AddNew
addNew.Show()
Case 1 : MsgBox("Delete")
End Select
</code>
this whole function is executed before the form is displayed on the screen, so any update commands i add here are running before the new items have been added.
i am unable to find an event that fires on the original form when the addnew form has completed.
i have tried to create a new instance of the original form in addnew and running a sub that would do the update, but it is not referencing the correct (original) version of the form.
Please could anyone help (that is, if you can understand my babblings
thanks in advance