"Paul Overway" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)
> Either of the methods you are using is bad practice anyway....neither
> will catch errors during compile. Any of the following would be
> better (depending on need):
>
> Me.SomeControl
>
> Or
>
> Me.Parent.SomeControl
>
> Or
>
> Me.SomeSubForm.Form.SomeControl
>
> Or
>
> Forms("SomeForm").SomeControl
>
> The only time I use the
> [Forms]![frmExplorer]![sbfrmGeneric]![cbo_Search] syntax is in
> queries.
I'd say it is a matter of opinion whether it is bad practice or not, and
there are arguments to be made on either side -- though in fact I also
prefer to use the dot notation as Paul Overway recommends. Note,
though, that there are circumstances in which one *must* use the bang
notation. Specifically, if one needs to refer to a control or field
that has the same name as a property of the form (not a good idea, but
it happens), then the bang must be used.
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)