splaisance
Programmer
I have an odd situation that I hope someone can help with.
I have 2 DataGrids on a form. The first has detail information and the second has totals.
When the user changes an amount in the first grid, I want the cooresponding total to change in the second grid.
In the Grid1_AfterUpdate() event, I refresh the adodc control for grid 2:
Private Sub Grid1_AfterUpdate()
' Refresh the link to the totals recordsource
Adodc1.Refresh
end sub
This code does not work correctly. After the second detail record is changed, the first change is made to the totals.
Now if i put a msgbox in the code:
Private Sub Grid1_AfterUpdate()
MsgBox "After Update"
' Refresh the link to the totals recordsource
Adodc1.Refresh
end sub
Then the code will work the way I want it. A record is changed in Grid1, the user moves the cursor to the next record, then the total in Grid2 is updated.
I do not want to have a msgbox after each updated row - how can I get this code to work without the msgbox statement?
I have tried various combinations of refreshing grid2, rebinging grid2 and the like but have not found the answer.
I would appreciate any thoughts, suggestions on the matter.
Thanks!
I have 2 DataGrids on a form. The first has detail information and the second has totals.
When the user changes an amount in the first grid, I want the cooresponding total to change in the second grid.
In the Grid1_AfterUpdate() event, I refresh the adodc control for grid 2:
Private Sub Grid1_AfterUpdate()
' Refresh the link to the totals recordsource
Adodc1.Refresh
end sub
This code does not work correctly. After the second detail record is changed, the first change is made to the totals.
Now if i put a msgbox in the code:
Private Sub Grid1_AfterUpdate()
MsgBox "After Update"
' Refresh the link to the totals recordsource
Adodc1.Refresh
end sub
Then the code will work the way I want it. A record is changed in Grid1, the user moves the cursor to the next record, then the total in Grid2 is updated.
I do not want to have a msgbox after each updated row - how can I get this code to work without the msgbox statement?
I have tried various combinations of refreshing grid2, rebinging grid2 and the like but have not found the answer.
I would appreciate any thoughts, suggestions on the matter.
Thanks!