Re: A quick question...

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Lee (anonymous_at_discussions.microsoft.com)
Date: 02/04/04


Date: Wed, 4 Feb 2004 13:41:45 -0800

I see what you mean. Thanks for the quick response Dirk.

Best Regards,

Lee

>-----Original Message-----
>"Lee" <anonymous@discussions.microsoft.com> wrote in
message
>news:a5e101c3eb57$f0827730$a601280a@phx.gbl
>> Just a quick question:
>>
>> Is it possible to run a procedure on a different form
to
>> the one that's currently in focus?
>> To be specific:
>> Form A is open and when users click on a particular
>> button, Form B opens as well.
>> When the user then clicks on a particular button on
Form
>> B, certain queries are actioned before Form B is closed
>> and the focus is returned to Form A. Whilst Form B is
>> still open (and after the queries have run), I'd like
to
>> be able to ask Form A to run the 'Form_Current'
procedure
>> that's within Form A. Is this possible and if so, how
do
>> I refer to this in code?
>>
>> Thanks guys (as always),
>>
>> Lee
>
>This is possible only if you change the
keyword "Private" to "Public"
>on the definition of the Form_Current procedure in form
A. That is,
>where it was originally
>
> Private Sub Form_Current()
>
>change it to
>
> Public Sub Form_Current()
>
>Then you can call it by qualifying the procedure name
with a reference
>to the form in the Forms collection:
>
> Call Forms![Form A].Form_Current
>
>--
>Dirk Goldgar, MS Access MVP
>www.datagnostics.com
>
>(please reply to the newsgroup)
>
>
>.
>


Quantcast