By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,705 Members | 1,891 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,705 IT Pros & Developers. It's quick & easy.

Sequence of Form events

P: n/a
Anyone know if there is an Event that occurs when you open a form AFTER it
is visible on the screen? I've tried Open, Activate, Load, Current, Got
Focus. None of them do. ???
Nov 12 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Sometimes the obvious may elude us. If the form is already open, why are you
issuing a DoCmd.OpenForm? Why not put code like this in the same place :

Forms!MyForm.method

or

Forms!MyForm.Property =

or

Forms!MyForm!MyControl <something>
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
www.pcdatasheet.com
"Randy Harris" <ra***@SpamFree.com> wrote in message
news:pH******************@newssvr28.news.prodigy.c om...
Anyone know if there is an Event that occurs when you open a form AFTER it
is visible on the screen? I've tried Open, Activate, Load, Current, Got
Focus. None of them do. ???

Nov 12 '05 #2

P: n/a
I can see why my request makes little sense. I'm trying to do something
that Access really isn't designed for. I want to create an MDE that will
function as a utility. I'd like the StartupForm to appear, then code
immediately begin to run with no intervention from the user. No matter what
I try, the code runs before the form appears on the screen. I finally gave
up and put a Command button on it that the user must click to start the
procedure.

"PC Datasheet" <sp**@nospam.net> wrote in message
news:gA*******************@newsread2.news.atl.eart hlink.net...
Sometimes the obvious may elude us. If the form is already open, why are you issuing a DoCmd.OpenForm? Why not put code like this in the same place :

Forms!MyForm.method

or

Forms!MyForm.Property =

or

Forms!MyForm!MyControl <something>
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
www.pcdatasheet.com
"Randy Harris" <ra***@SpamFree.com> wrote in message
news:pH******************@newssvr28.news.prodigy.c om...
Anyone know if there is an Event that occurs when you open a form AFTER it is visible on the screen? I've tried Open, Activate, Load, Current, Got
Focus. None of them do. ???


Nov 12 '05 #3

P: n/a
TC
Have the startup form say Me.Visible=True at the point where it is about
to run the code & you want it to become visible.

Your question really was, "how can I make a form visible before it runs some
code?", not "what events occur after a form has become visible" :-)
HTH,
TC
"Randy Harris" <ra***@SpamFree.com> wrote in message
news:0B******************@newssvr28.news.prodigy.c om...
I can see why my request makes little sense. I'm trying to do something
that Access really isn't designed for. I want to create an MDE that will
function as a utility. I'd like the StartupForm to appear, then code
immediately begin to run with no intervention from the user. No matter what I try, the code runs before the form appears on the screen. I finally gave up and put a Command button on it that the user must click to start the
procedure.

"PC Datasheet" <sp**@nospam.net> wrote in message
news:gA*******************@newsread2.news.atl.eart hlink.net...
Sometimes the obvious may elude us. If the form is already open, why are you
issuing a DoCmd.OpenForm? Why not put code like this in the same place :

Forms!MyForm.method

or

Forms!MyForm.Property =

or

Forms!MyForm!MyControl <something>
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
www.pcdatasheet.com
"Randy Harris" <ra***@SpamFree.com> wrote in message
news:pH******************@newssvr28.news.prodigy.c om...
Anyone know if there is an Event that occurs when you open a form AFTER it
is visible on the screen? I've tried Open, Activate, Load, Current,

Got Focus. None of them do. ???


Nov 12 '05 #4

P: n/a
"TC" <a@b.c.d> wrote in message news:1066037893.580461@teuthos...
Have the startup form say Me.Visible=True at the point where it is about
to run the code & you want it to become visible.

Your question really was, "how can I make a form visible before it runs some code?", not "what events occur after a form has become visible" :-)

Well... You're right. I focused only on how to run the code after the form
became visible. It never dawned on me that it could be done the other way
around, make the form visible before the code is run. Thanks.

HTH,
TC
"Randy Harris" <ra***@SpamFree.com> wrote in message
news:0B******************@newssvr28.news.prodigy.c om...
I can see why my request makes little sense. I'm trying to do something
that Access really isn't designed for. I want to create an MDE that will
function as a utility. I'd like the StartupForm to appear, then code
immediately begin to run with no intervention from the user. No matter

what
I try, the code runs before the form appears on the screen. I finally

gave
up and put a Command button on it that the user must click to start the
procedure.

"PC Datasheet" <sp**@nospam.net> wrote in message
news:gA*******************@newsread2.news.atl.eart hlink.net...
Sometimes the obvious may elude us. If the form is already open, why are
you
issuing a DoCmd.OpenForm? Why not put code like this in the same place

:
Forms!MyForm.method

or

Forms!MyForm.Property =

or

Forms!MyForm!MyControl <something>
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
www.pcdatasheet.com
"Randy Harris" <ra***@SpamFree.com> wrote in message
news:pH******************@newssvr28.news.prodigy.c om...
> Anyone know if there is an Event that occurs when you open a form

AFTER
it
> is visible on the screen? I've tried Open, Activate, Load, Current,

Got > Focus. None of them do. ???


Nov 12 '05 #5

P: n/a
"Randy Harris" <ra***@SpamFree.com> wrote in message
news:0B******************@newssvr28.news.prodigy.c om...
I can see why my request makes little sense. I'm trying to do something
that Access really isn't designed for. I want to create an MDE that will
function as a utility. I'd like the StartupForm to appear, then code
immediately begin to run with no intervention from the user.

Just place doevents command at the start of the your code.

If there is a few other places were you "update" the screen in the code,
again just put DoEvents at that point in the code.

The event driven nature of ms-access means that some screen updates and
drawing does NOT occur during processing (99%of the time, this is the best
way, as you don't waste tons of processing to figure out when to update the
screen...you simply wait until the mouse appears, and then draw everything.
DoEvents will flush all those pending draws, and update stuff out of the
buffer).
--
Albert D. Kallal (MVP)
Edmonton, Alberta Canada
ka****@msn.com
http://www.attcanada.net/~kallal.msn

Nov 12 '05 #6

P: n/a
"Albert D. Kallal" <ka****@msn.com> wrote in message
news:FlGib.84732$9l5.64970@pd7tw2no...
"Randy Harris" <ra***@SpamFree.com> wrote in message
news:0B******************@newssvr28.news.prodigy.c om...
I can see why my request makes little sense. I'm trying to do something
that Access really isn't designed for. I want to create an MDE that will function as a utility. I'd like the StartupForm to appear, then code
immediately begin to run with no intervention from the user.

Just place doevents command at the start of the your code.

If there is a few other places were you "update" the screen in the code,
again just put DoEvents at that point in the code.

The event driven nature of ms-access means that some screen updates and
drawing does NOT occur during processing (99%of the time, this is the best
way, as you don't waste tons of processing to figure out when to update

the screen...you simply wait until the mouse appears, and then draw everything. DoEvents will flush all those pending draws, and update stuff out of the
buffer).
I had tried DoEvents, it, surprisingly, didn't do what I needed. Me.Visible
= True in the Activate Event, however did.
-- Albert D. Kallal (MVP)
Edmonton, Alberta Canada
ka****@msn.com
http://www.attcanada.net/~kallal.msn

Nov 12 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.