title: Gray out a form row's (detail's) button conditionally with VBA code
body: <p>I have a standard form in MS-Access which lists a bunch of orders, and each row contains order no, customer, etc fields + a button to view notes and attached document files.</p>
  
  <p>On request from our customer we should gray out the button <code>btnAnm</code> (or check or uncheck a checkbox) depending on a calculation from two queries to two other tables (a SELECT COUNT WHERE and a check if a text field is empty).</p>
  
  <p>I've tried <code>btnAnm_BeforeUpdate(...)</code> and <code>btnAnm_BeforeRender(...)</code> and put breakpoints in the subs, but none of them trigger. The same if I use the control <code>Ordernr</code> instead of <code>btnAnm</code>.</p>
  
  <p>I'd like a function in the Detail VBA code to be triggered for each "<code>Me.</code>" (row) so to speak, and set the row's control's properties in that sub.</p>
  
  <p>What do I do? I've looked at the help file and searched here.</p>
  
  <p>*Edit: So I want to do something that "isn't made to work that way"? Ie. events are not triggered in Details.
  As an alternative, could I base the value of a checkbox on each line on a query based on the 'Ordernr' field of the current row and the result of a SELECT COUNT from another table and empty field check?</p>
  
  <p>Do I do this in the query the list is based on, or can I bind the extra checkbox field to a query?</p>
  
  <p>A description of how to do this (combine a COUNT and a WHERE "not empty" to yes/no checkbox value) would be perfectly acceptable, I think! :)* </p>