I've set up a 3 grid screen. The top grid should control the other 2 grids.
I get the current record of the top grid with this line.
mitem = dv1(cma.Position)("sponsor_id")
It bings me the correct information
I then call 2 routines to populate 2 datatables
I have code to empty the datatables at the beginning of each routine
a_tmpf3.Clear()
I run a select statement to get the data I want.
I then clear the grids and reset the data source
grddistributors.EndEdit()
grddistributors.DataSource = Nothing
grddistributors.Rows.Clear()
grddistributors.Refresh()
grddistributors.DataSource = a_tmpf3.DefaultView 'G2.Tables("thedists")
grddistributors.Refresh()
No mater what I've tried what happens is that the previous data stays and the new data is added. All I want is the new data.
I get the current record of the top grid with this line.
mitem = dv1(cma.Position)("sponsor_id")
It bings me the correct information
I then call 2 routines to populate 2 datatables
I have code to empty the datatables at the beginning of each routine
a_tmpf3.Clear()
I run a select statement to get the data I want.
I then clear the grids and reset the data source
grddistributors.EndEdit()
grddistributors.DataSource = Nothing
grddistributors.Rows.Clear()
grddistributors.Refresh()
grddistributors.DataSource = a_tmpf3.DefaultView 'G2.Tables("thedists")
grddistributors.Refresh()
No mater what I've tried what happens is that the previous data stays and the new data is added. All I want is the new data.