[AccessD] Call an event in another form

William Benson vbacreations at gmail.com
Mon Aug 15 18:55:20 CDT 2011


I sure do..... a lot ..... in design view. But not while the user is doing
something. The issue is not so much what we do by intent but what the user
does despite the programmers intent.

In short I agree with you.

I do not have time to lock down my interface. So when I want to do something
ONLY if a form is really open I set a form variable as I described earlier.
On Aug 15, 2011 7:31 PM, "Jim Dettman" <jimdettman at verizon.net> wrote:
>
>
> One gotcha on that (speaking from experience), IsLoaded is true if the
> form is in design or normal view (that is it is simply "loaded"). If you
> never do anything in design view at runtime (and most don't), then your
safe
> with that. Otherwise you can get some un-expected results.
>
> Jim.
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
> Sent: Monday, August 15, 2011 07:04 PM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] Call an event in another form
>
> As an aside, I'm using this to determine if a form is loaded:
>
> If CurrentProject.AllForms("SearchScreen").IsLoaded = True Then
>
> Rocky
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson
> (VBACreations.Com)
> Sent: August 15, 2011 3:50 PM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] Call an event in another form
>
> 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
>
> --
> 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