William Benson (VBACreations.Com)
vbacreations at gmail.com
Mon Aug 15 17:50:20 CDT 2011
Lately I have been calling functions from most events. Private Sub SaveRecord_Click() Call SaveRecord End Sub Sub SaveRecord() 'Do the stuff SaveRecord_Click() would do End Sub And based on this I seem to be able to call it easily from any form 'In some other form Private Sub Call Forms("OtherForm").SaveRecord 'As long as OtherForm is open End Sub -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Monday, August 15, 2011 5:56 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Call an event in another form In that case, ignore my subsequent post <g> -- Stuart On 15 Aug 2011 at 14:33, Rocky Smolin wrote: > Nope, my bad Public works. Think I had to recompile. > > Thanks > > Rocky > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky > Smolin Sent: August 15, 2011 2:19 PM To: 'Access Developers discussion > and problem solving' Subject: Re: [AccessD] Call an event in another > form > > Yeah, doesn't help, though, I think the error's being generated by the > syntax of the calling statement - I think it never gets so far as to > look for the sub. > > R > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart > McLachlan Sent: August 15, 2011 2:17 PM To: Access Developers > discussion and problem solving Subject: Re: [AccessD] Call an event in > another form > > Have you declared lblTime0_CLick as Public in the form module? > > -- > Stuart > > On 15 Aug 2011 at 14:07, Rocky Smolin wrote: > > > Dear List: > > > > I am trying to call the sub lblTime0_Click() which is in the CBF > > frmMatterButtonsHorizontal. > > > > Using: > > > > Call Forms("frmMatterButtonsHorizontal").lblTime0_Click > > > > gives me an application-defined or object-defined error. > > > > What is the correct syntax? > > > > 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 > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com