[AccessD] Refer to a control on parent form from subform

Jim Dettman jimdettman at verizon.net
Tue Apr 17 12:04:39 CDT 2012


<<IF it's the same as Access 2003, that is!>>

 It is.  A2000 and A2003 are very close.  About the only thing A2003 has
over A2000 is the printer object and a little more stability.

 And for both, you can use the Me. Shorthand if the code is running in the
parent/subform:

  Me.SubformControlName.Form.Controlname  

And 

  Me.Parent.ControlName

Jim. 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Janet Erbach
Sent: Tuesday, April 17, 2012 12:51 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Refer to a control on parent form from subform

Arthur -

If it's the same as Access 2003 it would be something like this, I believe:

Forms!ParentForm_Name!Subform_Name.Form.Controlname   - gives you the value
of a control on the subform

Forms!ParentForm_Name.Controlname   - gives you the value of a control on
the parent form

IF it's the same as Access 2003, that is!

Janet Erbach




On Tue, Apr 17, 2012 at 11:38 AM, Arthur Fuller
<fuller.artful at gmail.com>wrote:

> Actually I need to do it both ways.
>
> On the subform I need to refer to the value of a control on the parent
> form.
> On the parent form I need to set the recordsource of the subform.
>
> I've forgotten the Access 2000 (SP3) syntax.
>
> TIA,
> --
> Arthur
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list