I've implemented the sample in the help to draw a red dot in all fields on the grid. When I click anywhere else in the grid, the custom content appears again, then immediately disappears again and stays gone.

Is this behaviour by design or am I doing something wrong, or maybe not doing something I do need to do to ensure the custom drawn content is always displayed?

Specifically, I have a grid that will open a dialog when clicked. I want to show a 'browse' button, and when that cell is clicked, the button needs to stay there.

Kind Regards,
Can you send us a sample to reproduce the issue?

In the simplest manner possible, the issue does not reproduce when I isolate it. I'll need to do some additional research, to see if it is related to screenupdating issues. (beginupdate)

Kind regards,
Is it possible that the AfterCellContentsDraw event does not fire if I called BeginUpdate, until I call EndUpdate?

I've added an example form that shows the erroneous behaviour. (3kb) downloaded 53 time(s).

use the form like:

DoCmd.OpenForm "Test"

then click around in the cells.
I imported your text definition of the form using Application.LoadFromText, but it was not enough. As I see, you are using some global vars as gdGrid not defined in the module, we have the Init sub never called, etc.

Can you send us a full sample to reproduce the issue?

And what is the purpose of having the following event handler?

Private Sub iGrid_Click(ByVal lRowIfAny As Long, ByVal lColIfAny As Long)
End Sub

BTW, it's an interesting thought that AfterCellContentsDraw should not be fired if redrawing is turned off. Do you think it may help in your case?
I called the init sub manually:

Docmd.OpenForm "Test"

But I attached a accdb now that works better, just open the form. (28kb) downloaded 60 time(s).

And the eventhandler exposes the problem where the custom content vanishes. Comment those two lines and the content does not disappear, but like this, when you click on cells in the grid, the red dots seem random.

I think the draw events should be fired, even though redrawing is turned off. Because redrawing is linked to what you see on the screen, not what is actually happening in the cell.
Yes, when I comment out those BeginUpdate/EndUpdate, I see the effect you are talking about. But in this case we are just trying to emulate it. Can you show us when this problem really occurs in a real-world database?
that's a bit hard to do. Our database is an application that needs certain external libraries and an external database. It won't work without those.

The effect is emulated, but emulated very well. It matches the real effect perfectly. Is there another way that I can provide more info? Like a video taken of the effect perhaps?
You emulated the effect, but I need to reproduce it in a real situation to fix it.

Try to create a new database with one form and copy the code from the original database until you reproduce the issue.
I'm still thinking about this problem. Some questions:

1) Is your dialog displayed as a modal form?

2) Do you display it from the Click event? Have you tried another event like MouseDown or MouseUp?

The problem may be related to some specific Windows message processing in MS Access or something like that.

There are forms that are displayed modally, but usually they're not modal. In the specific example, the grid is loaded using a method call from outside the form, that is how we use it as well.

1. A user clicks on a button on another form (menu)
2. a new form is opened
3. the grid receives data, usually through a recordset
4. the form is displayed (either as the main content, but the menu is still available or as a modal window (a search window))
5. initially the custom content is drawn.
6. a user clicks in the grid
7. an event is fired, that might affect the contents. Therefore, somewhere along the line the beginupdate call is used on the grid
8. assumption: starting from beginupdate, until endupdate is called, all instances of aftercellcustomdraw are ignored.
9. some or all of the custom content in the cell disappears.

The grid appears when loading the form, but the beginupdate may be called from a number of events, inclusing mouseevents, clickevents, timerevents... I think most of those are used in the application a a whole.

I still need some more time to create a stripped database containing something more of a real-word example, though I still think the previous example is quite thorough already and close to reality.

Thanks for your thoughts thus far,
As I explained, all drawing operations including the AfterCellContentsDraw event must be ignored if updates are off after BeginUpdate. However, when you call the last EndUpdate and the grid must be updated, all cells in the grid should be redrawn and sure, all related AfterCellContentsDraw event handlers should be executed. That's strange if this does not happen in your case...