[AccessD] Referring to a function in a subform

Rocky Smolin rockysmolin at bchacc.com
Mon Jul 18 15:16:14 CDT 2011


That's the way it SHOULD work.  But it didn't for me.  So I moved it to a
public function and it works now.

Rocky


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darrell Burns
Sent: Monday, July 18, 2011 11:06 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Referring to a function in a subform

Hey Rocky. Here's how I do it...

In MasterForm:
Set fSub = Me.Form(SubformName)
fSub.Form.GoToID Nz(MoveToID, 0)

In SubForm:
Public Sub GoToID(Optional optMoveToID)

HTH,
DB
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
Sent: Monday, July 18, 2011 9:16 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Referring to a function in a subform

Tried public but no soap.  Moving it to a module now.  

R
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust
Sent: Monday, July 18, 2011 9:13 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Referring to a function in a subform

Bill has it right.  If the scope of the routine isn't public, it is visible
as a method only within the subform itself.

Charlotte Foust

On Mon, Jul 18, 2011 at 8:57 AM, Rocky Smolin <rockysmolin at bchacc.com>wrote:

> Dear List:
>
> Gets me every time.
>
> I want to call a private function in a subform on my main form.  
> Subform name is subfrmAccount, main form is frmEditAccounts, function 
> name is MakeShippingLabelEditAccounts.
>
> I've tried a lot of variations like:
>
> Me.fldShippingLabel =
> Forms!frmEditAccounts.subfrmAccount.Form.MakeShippingLabelEditAccounts
>
> with ! and . in various places and nothing works.
>
> The function works fine when I use it in the subform.
>
> Help!
>
> MTIA
>
> Rocky Smolin
> Beach Access Software
> 858-259-4334
> www.bchacc.com
>
> <http://www.bchacc.com/
>
> >
> www.e-z-mrp.com
>
> <http://www.e-z-mrp.com/
>
> >
>
> --
> 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

--
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