[AccessD] Cannot refer to a textbox on a form in the form'srecordsource on open

Arthur Fuller fuller.artful at gmail.com
Sun Oct 26 12:09:59 CDT 2014


Very cool, Jim.

On Sun, Oct 26, 2014 at 1:04 PM, Jim Dettman <jimdettman at verizon.net> wrote:

> <<However, if I want the assumed minimum age to be 18, there is no way I
> can
> set this value when the form is opening. It does me no good to have the
> value in the control's default, the control is still NULL at the time that
> the recordsource is evaluated the first time.  >>
>
>   Old trick:
>
>  Issue a me.repaint in the form's OnOpen event.
>
>   This occurs before the load of the forms recordset and the .repaint
> forces
> the instantiation of all controls before the code will continue.
>
>   So you can add a control, default it, then have your SQL point to it with
> out issue.
>
> Jim.


More information about the AccessD mailing list