On Nov 9, 10:29=A0am, "Dirk Goldgar"
<d...@NOdataSPAMgnostics.com.invalid> wrote:
> "MiataDiablo" <miatadia...@gmail.com> wrote in message
>
> news:97293ef0-420a-4b70-957a-5e888bf62968@h10g2000vbm.googlegroups.com...
>
> > On my main form (frmBenefits), I have a subform (subActions) that is
> > continuous. =A0Either when the the subform receives focus or if the
> > subform is dirty (I don't care which), I would like a field on the
> > main form (cboStatus) to become visible.
>
> > I've googled and googled and can't find when/where to trigger the
> > event and the proper syntax. =A0Any help and direction is greatly
> > appreciated!
>
> For showing the combo box when the subform gets the focus, you could use =
the
> subform *control's* Enter event. =A0I'm talking here about the subform co=
ntrol
> on the main form, not any of the controls that are actually on the subfor=
m.
> Anyway, your code would be something like this:
>
> '------ start of code ------
> Private Sub subActions_Enter()
>
> =A0 =A0 Me.cboStatus.Visible =3D True
>
> End Sub
>
> Private Sub subActions_Exit()
>
> =A0 =A0 Me.cboStatus.Visible =3D False
>
> End Sub
> '------ end of code ------
>
> The code for the Exit event is because I assume that you want to hide the
> combo when the subform doesn't have the focus.
>
> If you want to wait until the subform becomes dirty, you could use the Di=
rty
> event of the subform's SourceObject form, but you'd also have to use some
> event of the main form, maybe the Current event, to hide the combo box
> again.
>
> --
> Dirk Goldgar, MS Access MVP
> Access tips:www.datagnostics.com/tips.html
>
> (please reply to the newsgroup)
Thank you so much, as usual I was killing a gnat with C4.