I have a bound form in Access 2010 with a tab control. I've placed and successfully used two grids on two separate tabs.
When I placed a third grid on a new tab I couldn't see the rows I was filling the grid with.
It seems to have something to do with End/BeginUpdate. If I place a fresh grid on the tab and use AddRow without Begin/EndUpdate it works as intended. When I reload the rows with End/BeinUpdate called, the content turns invisible. I can see that the grid is being filled with data and I can copy cells and paste text in a text document. When I turn off Begin/EndUpdate in the update procedure it is still broken.
The other two grids in the form does not have this issue.
Any thoughts? Am I missing something simple?
I've simplified the code for testing purpose:
Dim g As iGrid
Dim l As Long
Set g = Me.gEntreprenad.Object
g.BeginUpdate
g.Clear
l = g.AddRow()
g.CellValue(l, 1) = "a1"
g.CellValue(l, 2) = "a2"
g.EndUpdate
Set g = Nothing
SOLVED:
It turns out I exited the update procedure in some cases without .EndUpdate. *slap self*
Edited by user
2015-06-23T12:26:02Z
|
Reason: Solved