Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: Referring to a Subform's ControlSource

Geek News

Referring to a Subform's ControlSource
"L.A. Lawyer" <kapplaw[ at ]linkline.com> 11/26/2008 11:40:34 PM
I want to refer to a subform's ControlSource (Access 2000).

What is the code?

Thanks.


Re: Referring to a Subform's ControlSource
"Ken Snell \(MVP\)" <kthsneisllis9[ at ]ncoomcastt.renaetl> 11/27/2008 12:05:01 AM
A subform does not have a ControlSource property. Are you wanting the
SourceObject property (which is the name of the form that is being used as
the subform)?

Assuming yes, this reference can be used in the module for the main form:

Me.NameOfSubformControlOnMainForm.SourceObject

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/


"L.A. Lawyer" <kapplaw[ at ]linkline.com> wrote in message
news:%23W8GhCCUJHA.5920[ at ]TK2MSFTNGP06.phx.gbl...
[Quoted Text]
>I want to refer to a subform's ControlSource (Access 2000).
>
> What is the code?
>
> Thanks.
>
>


RE: Referring to a Subform's ControlSource
Beetle 11/27/2008 12:08:01 AM
A *subform control* has a Source Object, which would be;

Me![NameOfSubformControl].SourceObject

-or-

A *subform* has a Record Source, which would be;

Me![NameOfSubformControl].Form.RecordSource

but neither one has a Control Source
--
_________

Sean Bailey


"L.A. Lawyer" wrote:

[Quoted Text]
> I want to refer to a subform's ControlSource (Access 2000).
>
> What is the code?
>
> Thanks.
>
>
>
Re: Referring to a Subform's ControlSource
Marshall Barton <marshbarton[ at ]wowway.com> 11/27/2008 12:21:25 AM
L.A. Lawyer wrote:

[Quoted Text]
>I want to refer to a subform's ControlSource (Access 2000).
>
>What is the code?


Neither a subform control nor a form object displayed in a
subform control have a control source property. If you
meant the record source property, then the syntax would be:
Me.[subform control].Form.RecordSource

--
Marsh
MVP [MS Access]

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net